[PATCH 06/55] media: rkisp1: Rename rkisp1_match_data to rkisp1_info
Paul Elder
paul.elder at ideasonboard.com
Tue Jun 14 12:10:38 PDT 2022
From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
The rkisp1_match_data structure contains device model-specific
information. It it referenced from OF match data, but that's an
implementation detail. Rename it to rkisp1_info to reflect its main
purpose.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
.../platform/rockchip/rkisp1/rkisp1-dev.c | 34 +++++++++----------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
index ba773c0784fb..258980ef4783 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
@@ -105,7 +105,7 @@ struct rkisp1_isr_data {
irqreturn_t (*isr)(int irq, void *ctx);
};
-struct rkisp1_match_data {
+struct rkisp1_info {
const char * const *clks;
unsigned int clk_size;
const struct rkisp1_isr_data *isrs;
@@ -420,7 +420,7 @@ static const struct rkisp1_isr_data px30_isp_isrs[] = {
{ "mipi", rkisp1_mipi_isr },
};
-static const struct rkisp1_match_data px30_isp_match_data = {
+static const struct rkisp1_info px30_isp_info = {
.clks = px30_isp_clks,
.clk_size = ARRAY_SIZE(px30_isp_clks),
.isrs = px30_isp_isrs,
@@ -438,7 +438,7 @@ static const struct rkisp1_isr_data rk3399_isp_isrs[] = {
{ NULL, rkisp1_isr },
};
-static const struct rkisp1_match_data rk3399_isp_match_data = {
+static const struct rkisp1_info rk3399_isp_info = {
.clks = rk3399_isp_clks,
.clk_size = ARRAY_SIZE(rk3399_isp_clks),
.isrs = rk3399_isp_isrs,
@@ -449,11 +449,11 @@ static const struct rkisp1_match_data rk3399_isp_match_data = {
static const struct of_device_id rkisp1_of_match[] = {
{
.compatible = "rockchip,px30-cif-isp",
- .data = &px30_isp_match_data,
+ .data = &px30_isp_info,
},
{
.compatible = "rockchip,rk3399-cif-isp",
- .data = &rk3399_isp_match_data,
+ .data = &rk3399_isp_info,
},
{},
};
@@ -461,7 +461,7 @@ MODULE_DEVICE_TABLE(of, rkisp1_of_match);
static int rkisp1_probe(struct platform_device *pdev)
{
- const struct rkisp1_match_data *match_data;
+ const struct rkisp1_info *info;
struct device *dev = &pdev->dev;
struct rkisp1_device *rkisp1;
struct v4l2_device *v4l2_dev;
@@ -469,8 +469,8 @@ static int rkisp1_probe(struct platform_device *pdev)
int ret, irq;
u32 cif_id;
- match_data = of_device_get_match_data(&pdev->dev);
- if (!match_data)
+ info = of_device_get_match_data(&pdev->dev);
+ if (!info)
return -ENODEV;
rkisp1 = devm_kzalloc(dev, sizeof(*rkisp1), GFP_KERNEL);
@@ -486,14 +486,14 @@ static int rkisp1_probe(struct platform_device *pdev)
if (IS_ERR(rkisp1->base_addr))
return PTR_ERR(rkisp1->base_addr);
- for (i = 0; i < match_data->isr_size; i++) {
- irq = match_data->isrs[i].name
- ? platform_get_irq_byname(pdev, match_data->isrs[i].name)
+ for (i = 0; i < info->isr_size; i++) {
+ irq = info->isrs[i].name
+ ? platform_get_irq_byname(pdev, info->isrs[i].name)
: platform_get_irq(pdev, i);
if (irq < 0)
return irq;
- ret = devm_request_irq(dev, irq, match_data->isrs[i].isr, IRQF_SHARED,
+ ret = devm_request_irq(dev, irq, info->isrs[i].isr, IRQF_SHARED,
dev_driver_string(dev), dev);
if (ret) {
dev_err(dev, "request irq failed: %d\n", ret);
@@ -501,12 +501,12 @@ static int rkisp1_probe(struct platform_device *pdev)
}
}
- for (i = 0; i < match_data->clk_size; i++)
- rkisp1->clks[i].id = match_data->clks[i];
- ret = devm_clk_bulk_get(dev, match_data->clk_size, rkisp1->clks);
+ for (i = 0; i < info->clk_size; i++)
+ rkisp1->clks[i].id = info->clks[i];
+ ret = devm_clk_bulk_get(dev, info->clk_size, rkisp1->clks);
if (ret)
return ret;
- rkisp1->clk_size = match_data->clk_size;
+ rkisp1->clk_size = info->clk_size;
pm_runtime_enable(&pdev->dev);
@@ -519,7 +519,7 @@ static int rkisp1_probe(struct platform_device *pdev)
pm_runtime_put(&pdev->dev);
- rkisp1->media_dev.hw_revision = match_data->isp_ver;
+ rkisp1->media_dev.hw_revision = info->isp_ver;
strscpy(rkisp1->media_dev.model, RKISP1_DRIVER_NAME,
sizeof(rkisp1->media_dev.model));
rkisp1->media_dev.dev = &pdev->dev;
--
2.30.2
More information about the Linux-rockchip
mailing list