diff mbox series

[-next,1/3] media: v4l2-subdev: enable module autoloading

Message ID 20240829075417.526459-2-liaochen4@huawei.com (mailing list archive)
State New
Headers show
Series media: enable module autoloading | expand

Commit Message

Liao Chen Aug. 29, 2024, 7:54 a.m. UTC
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
based on the alias from of_device_id table.

Signed-off-by: Liao Chen <liaochen4@huawei.com>
---
 drivers/media/i2c/mt9v111.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Biju Das Aug. 29, 2024, 8:27 a.m. UTC | #1
Hi Liao Chen,

Thanks for the patch.

> -----Original Message-----
> From: Liao Chen <liaochen4@huawei.com>
> Sent: Thursday, August 29, 2024 8:54 AM
> Subject: [PATCH -next 1/3] media: v4l2-subdev: enable module autoloading

Commit header is wrong.

> 
> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from
> of_device_id table.
> 
> Signed-off-by: Liao Chen <liaochen4@huawei.com>
> ---
>  drivers/media/i2c/mt9v111.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c index
> b0b98ed3c150..b6a2623798c5 100644
> --- a/drivers/media/i2c/mt9v111.c
> +++ b/drivers/media/i2c/mt9v111.c
> @@ -1265,6 +1265,7 @@ static const struct of_device_id mt9v111_of_match[] = {
>  	{ .compatible = "aptina,mt9v111", },
>  	{ /* sentinel */ },

Nit: Comma can be dropped from terminator entry as a separate patch.

Cheers,
Biju

>  };
> +MODULE_DEVICE_TABLE(of, mt9v111_of_match);
> 
>  static struct i2c_driver mt9v111_driver = {
>  	.driver = {
> --
> 2.34.1
Laurent Pinchart Aug. 29, 2024, 9:45 a.m. UTC | #2
On Thu, Aug 29, 2024 at 08:27:06AM +0000, Biju Das wrote:
> Hi Liao Chen,
> On Thursday, August 29, 2024 8:54 AM, Liao Chen wrote:
> > Subject: [PATCH -next 1/3] media: v4l2-subdev: enable module autoloading
> 
> Commit header is wrong.

Indeed, it should be

media: i2c: mt9v111: Enable module autoloading

> > Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from
> > of_device_id table.

Please also reflow the commit message to 72 columns. With those issues
fixed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> > 
> > Signed-off-by: Liao Chen <liaochen4@huawei.com>
> > ---
> >  drivers/media/i2c/mt9v111.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c index
> > b0b98ed3c150..b6a2623798c5 100644
> > --- a/drivers/media/i2c/mt9v111.c
> > +++ b/drivers/media/i2c/mt9v111.c
> > @@ -1265,6 +1265,7 @@ static const struct of_device_id mt9v111_of_match[] = {
> >  	{ .compatible = "aptina,mt9v111", },
> >  	{ /* sentinel */ },
> 
> Nit: Comma can be dropped from terminator entry as a separate patch.
> 
> Cheers,
> Biju
> 
> >  };
> > +MODULE_DEVICE_TABLE(of, mt9v111_of_match);
> > 
> >  static struct i2c_driver mt9v111_driver = {
> >  	.driver = {
Liao Chen Aug. 29, 2024, 1:03 p.m. UTC | #3
On 2024/8/29 17:45, Laurent Pinchart wrote:
> On Thu, Aug 29, 2024 at 08:27:06AM +0000, Biju Das wrote:
>> Hi Liao Chen,
>> On Thursday, August 29, 2024 8:54 AM, Liao Chen wrote:
>>> Subject: [PATCH -next 1/3] media: v4l2-subdev: enable module autoloading
>>
>> Commit header is wrong.
> 
> Indeed, it should be
> 
> media: i2c: mt9v111: Enable module autoloading
> 
>>> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from
>>> of_device_id table.
> 
> Please also reflow the commit message to 72 columns. With those issues
> fixed,
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
>>>
>>> Signed-off-by: Liao Chen <liaochen4@huawei.com>
>>> ---
>>>   drivers/media/i2c/mt9v111.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c index
>>> b0b98ed3c150..b6a2623798c5 100644
>>> --- a/drivers/media/i2c/mt9v111.c
>>> +++ b/drivers/media/i2c/mt9v111.c
>>> @@ -1265,6 +1265,7 @@ static const struct of_device_id mt9v111_of_match[] = {
>>>   	{ .compatible = "aptina,mt9v111", },
>>>   	{ /* sentinel */ },
>>
>> Nit: Comma can be dropped from terminator entry as a separate patch.
>>
>> Cheers,
>> Biju
>>
>>>   };
>>> +MODULE_DEVICE_TABLE(of, mt9v111_of_match);
>>>
>>>   static struct i2c_driver mt9v111_driver = {
>>>   	.driver = {
> 
Thanks for pointing out, just sent a patch series with these issues fixed.

Thanks,
Chen
diff mbox series

Patch

diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
index b0b98ed3c150..b6a2623798c5 100644
--- a/drivers/media/i2c/mt9v111.c
+++ b/drivers/media/i2c/mt9v111.c
@@ -1265,6 +1265,7 @@  static const struct of_device_id mt9v111_of_match[] = {
 	{ .compatible = "aptina,mt9v111", },
 	{ /* sentinel */ },
 };
+MODULE_DEVICE_TABLE(of, mt9v111_of_match);
 
 static struct i2c_driver mt9v111_driver = {
 	.driver = {