[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220415152811.636419-2-paul.kocialkowski@bootlin.com>
Date: Fri, 15 Apr 2022 17:27:27 +0200
From: Paul Kocialkowski <paul.kocialkowski@...tlin.com>
To: linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev
Cc: Yong Deng <yong.deng@...ewell.com>,
Paul Kocialkowski <paul.kocialkowski@...tlin.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Maxime Ripard <maxime@...no.tech>
Subject: [PATCH v4 01/45] media: sun6i-csi: Define and use driver name and (reworked) description
Add proper defines for driver name and description instead of
MODULE_NAME and hardcoding (cosmetics).
Also rework the description while at it to mention the hardware
generation that the driver supports and remove the video capture
mentions since it applies to the whole media device.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@...tlin.com>
Reviewed-by: Maxime Ripard <maxime@...no.tech>
---
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 14 ++++++--------
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 3 +++
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
index fc96921b0583..43dcd8117d3f 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
@@ -27,8 +27,6 @@
#include "sun6i_csi.h"
#include "sun6i_csi_reg.h"
-#define MODULE_NAME "sun6i-csi"
-
struct sun6i_csi_dev {
struct sun6i_csi csi;
struct device *dev;
@@ -730,7 +728,7 @@ static int sun6i_csi_v4l2_init(struct sun6i_csi *csi)
int ret;
csi->media_dev.dev = csi->dev;
- strscpy(csi->media_dev.model, "Allwinner Video Capture Device",
+ strscpy(csi->media_dev.model, SUN6I_CSI_DESCRIPTION,
sizeof(csi->media_dev.model));
csi->media_dev.hw_revision = 0;
snprintf(csi->media_dev.bus_info, sizeof(csi->media_dev.bus_info),
@@ -755,7 +753,7 @@ static int sun6i_csi_v4l2_init(struct sun6i_csi *csi)
goto free_ctrl;
}
- ret = sun6i_video_init(&csi->video, csi, "sun6i-csi");
+ ret = sun6i_video_init(&csi->video, csi, SUN6I_CSI_NAME);
if (ret)
goto unreg_v4l2;
@@ -870,8 +868,8 @@ static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev,
if (irq < 0)
return -ENXIO;
- ret = devm_request_irq(&pdev->dev, irq, sun6i_csi_isr, 0, MODULE_NAME,
- sdev);
+ ret = devm_request_irq(&pdev->dev, irq, sun6i_csi_isr, 0,
+ SUN6I_CSI_NAME, sdev);
if (ret) {
dev_err(&pdev->dev, "Cannot request csi IRQ\n");
return ret;
@@ -924,12 +922,12 @@ static struct platform_driver sun6i_csi_platform_driver = {
.probe = sun6i_csi_probe,
.remove = sun6i_csi_remove,
.driver = {
- .name = MODULE_NAME,
+ .name = SUN6I_CSI_NAME,
.of_match_table = of_match_ptr(sun6i_csi_of_match),
},
};
module_platform_driver(sun6i_csi_platform_driver);
-MODULE_DESCRIPTION("Allwinner V3s Camera Sensor Interface driver");
+MODULE_DESCRIPTION("Allwinner A31 Camera Sensor Interface driver");
MODULE_AUTHOR("Yong Deng <yong.deng@...ewell.com>");
MODULE_LICENSE("GPL");
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
index 3a38d107ae3f..e04f3c3fa27b 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
@@ -14,6 +14,9 @@
#include "sun6i_video.h"
+#define SUN6I_CSI_NAME "sun6i-csi"
+#define SUN6I_CSI_DESCRIPTION "Allwinner A31 CSI Device"
+
struct sun6i_csi;
/**
--
2.35.2
Powered by blists - more mailing lists