diff mbox series

[3/3] media: vgxy61: Add MODULE_ALIAS()

Message ID 20240610150815.228790-4-benjamin.mugnier@foss.st.com
State New
Headers show
Series media: vgxy61: Remove vendor prefix from driver name | expand

Commit Message

Benjamin Mugnier June 10, 2024, 3:08 p.m. UTC
Preserve user space retro compatibility after the device rename.

Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
---
 drivers/media/i2c/vgxy61.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Krzysztof Kozlowski June 11, 2024, 6:48 a.m. UTC | #1
On 10/06/2024 17:08, Benjamin Mugnier wrote:
> Preserve user space retro compatibility after the device rename.
> 
> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
> ---
>  drivers/media/i2c/vgxy61.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
> index ca3b43608dad..c85f356946ca 100644
> --- a/drivers/media/i2c/vgxy61.c
> +++ b/drivers/media/i2c/vgxy61.c
> @@ -1898,3 +1898,4 @@ MODULE_AUTHOR("Mickael Guene <mickael.guene@st.com>");
>  MODULE_AUTHOR("Sylvain Petinot <sylvain.petinot@foss.st.com>");
>  MODULE_DESCRIPTION("VGXY61 camera subdev driver");
>  MODULE_LICENSE("GPL");
> +MODULE_ALIAS("platform:st-vgxy61");

Why? Isn't this autoloated by OF alias? There was never here platform
alias so no functionality is lost.

NAK

Best regards,
Krzysztof
Sakari Ailus June 11, 2024, 8:21 a.m. UTC | #2
Hi Benjamin,

On Mon, Jun 10, 2024 at 05:08:15PM +0200, Benjamin Mugnier wrote:
> Preserve user space retro compatibility after the device rename.
> 
> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
> ---
>  drivers/media/i2c/vgxy61.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
> index ca3b43608dad..c85f356946ca 100644
> --- a/drivers/media/i2c/vgxy61.c
> +++ b/drivers/media/i2c/vgxy61.c
> @@ -1898,3 +1898,4 @@ MODULE_AUTHOR("Mickael Guene <mickael.guene@st.com>");
>  MODULE_AUTHOR("Sylvain Petinot <sylvain.petinot@foss.st.com>");
>  MODULE_DESCRIPTION("VGXY61 camera subdev driver");
>  MODULE_LICENSE("GPL");
> +MODULE_ALIAS("platform:st-vgxy61");

Perhaps just "st-vgxy61" so that the module still loads if someone loads it
explicitly? That's what you'd want, right, as the old compatible string
will remain?
Benjamin Mugnier June 11, 2024, 11:57 a.m. UTC | #3
Hi Sakari,

On 6/11/24 10:21, Sakari Ailus wrote:
> Hi Benjamin,
> 
> On Mon, Jun 10, 2024 at 05:08:15PM +0200, Benjamin Mugnier wrote:
>> Preserve user space retro compatibility after the device rename.
>>
>> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
>> ---
>>  drivers/media/i2c/vgxy61.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
>> index ca3b43608dad..c85f356946ca 100644
>> --- a/drivers/media/i2c/vgxy61.c
>> +++ b/drivers/media/i2c/vgxy61.c
>> @@ -1898,3 +1898,4 @@ MODULE_AUTHOR("Mickael Guene <mickael.guene@st.com>");
>>  MODULE_AUTHOR("Sylvain Petinot <sylvain.petinot@foss.st.com>");
>>  MODULE_DESCRIPTION("VGXY61 camera subdev driver");
>>  MODULE_LICENSE("GPL");
>> +MODULE_ALIAS("platform:st-vgxy61");
> 
> Perhaps just "st-vgxy61" so that the module still loads if someone loads it
> explicitly? That's what you'd want, right, as the old compatible string
> will remain?
> 

Yes it is for explicit loading. I'll remove the "platform" prefix.

But maybe I'm overthinking and I could just remove the MODULE_ALIAS()
completely from this series. What do you think ?
Sakari Ailus June 11, 2024, 1:11 p.m. UTC | #4
Hi Benjamin,

On Tue, Jun 11, 2024 at 01:57:24PM +0200, Benjamin Mugnier wrote:
> Hi Sakari,
> 
> On 6/11/24 10:21, Sakari Ailus wrote:
> > Hi Benjamin,
> > 
> > On Mon, Jun 10, 2024 at 05:08:15PM +0200, Benjamin Mugnier wrote:
> >> Preserve user space retro compatibility after the device rename.
> >>
> >> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
> >> ---
> >>  drivers/media/i2c/vgxy61.c | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
> >> index ca3b43608dad..c85f356946ca 100644
> >> --- a/drivers/media/i2c/vgxy61.c
> >> +++ b/drivers/media/i2c/vgxy61.c
> >> @@ -1898,3 +1898,4 @@ MODULE_AUTHOR("Mickael Guene <mickael.guene@st.com>");
> >>  MODULE_AUTHOR("Sylvain Petinot <sylvain.petinot@foss.st.com>");
> >>  MODULE_DESCRIPTION("VGXY61 camera subdev driver");
> >>  MODULE_LICENSE("GPL");
> >> +MODULE_ALIAS("platform:st-vgxy61");
> > 
> > Perhaps just "st-vgxy61" so that the module still loads if someone loads it
> > explicitly? That's what you'd want, right, as the old compatible string
> > will remain?
> > 
> 
> Yes it is for explicit loading. I'll remove the "platform" prefix.
> 
> But maybe I'm overthinking and I could just remove the MODULE_ALIAS()
> completely from this series. What do you think ?

Most of the time the modules are loaded based on devices found, so this
would likely not change things much.

Up to you.
Benjamin Mugnier June 11, 2024, 1:13 p.m. UTC | #5
On 6/11/24 15:11, Sakari Ailus wrote:
> Hi Benjamin,
> 
> On Tue, Jun 11, 2024 at 01:57:24PM +0200, Benjamin Mugnier wrote:
>> Hi Sakari,
>>
>> On 6/11/24 10:21, Sakari Ailus wrote:
>>> Hi Benjamin,
>>>
>>> On Mon, Jun 10, 2024 at 05:08:15PM +0200, Benjamin Mugnier wrote:
>>>> Preserve user space retro compatibility after the device rename.
>>>>
>>>> Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
>>>> ---
>>>>  drivers/media/i2c/vgxy61.c | 1 +
>>>>  1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
>>>> index ca3b43608dad..c85f356946ca 100644
>>>> --- a/drivers/media/i2c/vgxy61.c
>>>> +++ b/drivers/media/i2c/vgxy61.c
>>>> @@ -1898,3 +1898,4 @@ MODULE_AUTHOR("Mickael Guene <mickael.guene@st.com>");
>>>>  MODULE_AUTHOR("Sylvain Petinot <sylvain.petinot@foss.st.com>");
>>>>  MODULE_DESCRIPTION("VGXY61 camera subdev driver");
>>>>  MODULE_LICENSE("GPL");
>>>> +MODULE_ALIAS("platform:st-vgxy61");
>>>
>>> Perhaps just "st-vgxy61" so that the module still loads if someone loads it
>>> explicitly? That's what you'd want, right, as the old compatible string
>>> will remain?
>>>
>>
>> Yes it is for explicit loading. I'll remove the "platform" prefix.
>>
>> But maybe I'm overthinking and I could just remove the MODULE_ALIAS()
>> completely from this series. What do you think ?
> 
> Most of the time the modules are loaded based on devices found, so this
> would likely not change things much.
> 
> Up to you.
> 

Then I'd rather remove it entirely. The less legacy code the better.
Thank you.
diff mbox series

Patch

diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
index ca3b43608dad..c85f356946ca 100644
--- a/drivers/media/i2c/vgxy61.c
+++ b/drivers/media/i2c/vgxy61.c
@@ -1898,3 +1898,4 @@  MODULE_AUTHOR("Mickael Guene <mickael.guene@st.com>");
 MODULE_AUTHOR("Sylvain Petinot <sylvain.petinot@foss.st.com>");
 MODULE_DESCRIPTION("VGXY61 camera subdev driver");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:st-vgxy61");