[PATCH 02/22] fb: atmel_lcdfb: Stop using platform_driver_probe()
Helge Deller
deller at gmx.de
Wed Nov 8 13:57:00 PST 2023
On 11/8/23 22:52, Uwe Kleine-König wrote:
> On Wed, Nov 08, 2023 at 10:24:09PM +0100, Helge Deller wrote:
>> On 11/8/23 22:00, Uwe Kleine-König wrote:
>>> On Wed, Nov 08, 2023 at 11:48:05AM -0700, Nathan Chancellor wrote:
>>>> diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
>>>> index 88c75ae7d315..9e391e5eaf9d 100644
>>>> --- a/drivers/video/fbdev/atmel_lcdfb.c
>>>> +++ b/drivers/video/fbdev/atmel_lcdfb.c
>>>> @@ -220,7 +220,7 @@ static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int
>>>> }
>>>> }
>>>>
>>>> -static const struct fb_fix_screeninfo atmel_lcdfb_fix __initconst = {
>>>> +static const struct fb_fix_screeninfo atmel_lcdfb_fix = {
>>>> .type = FB_TYPE_PACKED_PIXELS,
>>>> .visual = FB_VISUAL_TRUECOLOR,
>>>> .xpanstep = 0,
>>>
>>> I wonder if this was broken already before my patch. atmel_lcdfb_probe()
>>> does
>>>
>>> info->fix = atmel_lcdfb_fix;
>>>
>>> and unless I miss something (this is well possible) that is used e.g. in
>>> atmel_lcdfb_set_par() -> atmel_lcdfb_update_dma(). So atmel_lcdfb_fix
>>> should better not live in .init memory?! Someone with more knowledge
>>> about fbdev might want to take a look and decide if this justifies a
>>> separate fix that should then be backported to stable, too?!
>>
>> I don't think a backport this is necessary.
>> The "__initconst" atmel_lcdfb_fix struct was only copied in the
>> "__init" atmel_lcdfb_probe() function.
>> So, both were dropped at the same time in older kernels.
>
> But info and so info->fix live longer than the probe function, don't
> they?
Yes, they do.
But AFAICS info->fix contains a *copy* of the initial atmel_lcdfb_fix struct
(and not a pointer to it). So that should be ok.
Helge
More information about the linux-arm-kernel
mailing list