Skip to content

Commit 6f4d084

Browse files
paulkocialkowskimchehab
authored andcommitted
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 <[email protected]> Reviewed-by: Maxime Ripard <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 26686b0 commit 6f4d084

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
#include "sun6i_csi.h"
2828
#include "sun6i_csi_reg.h"
2929

30-
#define MODULE_NAME "sun6i-csi"
31-
3230
struct sun6i_csi_dev {
3331
struct sun6i_csi csi;
3432
struct device *dev;
@@ -730,7 +728,7 @@ static int sun6i_csi_v4l2_init(struct sun6i_csi *csi)
730728
int ret;
731729

732730
csi->media_dev.dev = csi->dev;
733-
strscpy(csi->media_dev.model, "Allwinner Video Capture Device",
731+
strscpy(csi->media_dev.model, SUN6I_CSI_DESCRIPTION,
734732
sizeof(csi->media_dev.model));
735733
csi->media_dev.hw_revision = 0;
736734

@@ -753,7 +751,7 @@ static int sun6i_csi_v4l2_init(struct sun6i_csi *csi)
753751
goto free_ctrl;
754752
}
755753

756-
ret = sun6i_video_init(&csi->video, csi, "sun6i-csi");
754+
ret = sun6i_video_init(&csi->video, csi, SUN6I_CSI_NAME);
757755
if (ret)
758756
goto unreg_v4l2;
759757

@@ -868,8 +866,8 @@ static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev,
868866
if (irq < 0)
869867
return -ENXIO;
870868

871-
ret = devm_request_irq(&pdev->dev, irq, sun6i_csi_isr, 0, MODULE_NAME,
872-
sdev);
869+
ret = devm_request_irq(&pdev->dev, irq, sun6i_csi_isr, 0,
870+
SUN6I_CSI_NAME, sdev);
873871
if (ret) {
874872
dev_err(&pdev->dev, "Cannot request csi IRQ\n");
875873
return ret;
@@ -922,12 +920,12 @@ static struct platform_driver sun6i_csi_platform_driver = {
922920
.probe = sun6i_csi_probe,
923921
.remove = sun6i_csi_remove,
924922
.driver = {
925-
.name = MODULE_NAME,
923+
.name = SUN6I_CSI_NAME,
926924
.of_match_table = of_match_ptr(sun6i_csi_of_match),
927925
},
928926
};
929927
module_platform_driver(sun6i_csi_platform_driver);
930928

931-
MODULE_DESCRIPTION("Allwinner V3s Camera Sensor Interface driver");
929+
MODULE_DESCRIPTION("Allwinner A31 Camera Sensor Interface driver");
932930
MODULE_AUTHOR("Yong Deng <[email protected]>");
933931
MODULE_LICENSE("GPL");

drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
#include "sun6i_video.h"
1616

17+
#define SUN6I_CSI_NAME "sun6i-csi"
18+
#define SUN6I_CSI_DESCRIPTION "Allwinner A31 CSI Device"
19+
1720
struct sun6i_csi;
1821

1922
/**

0 commit comments

Comments
 (0)