lkml.org 
[lkml]   [2019]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5] ata/pata_buddha: Probe via modalias instead of initcall
From
Date

On 8/20/19 5:59 PM, Max Staudt wrote:
> Hi Bartlomiej,
>
> Thank you very much for your review!
>
> Question below.
>
>
> On 08/20/2019 02:06 PM, Bartlomiej Zolnierkiewicz wrote:
>>> + /* Workaround for X-Surf: Save drvdata in case zorro8390 has set it */
>>> + old_drvdata = dev_get_drvdata(&z->dev);
>>
>> This should be done only for type == BOARD_XSURF.
>
> Agreed, as I want to keep unloading functional for Buddha/Catweasel - see below.
>
>
>>> +static struct zorro_driver pata_buddha_driver = {
>>> + .name = "pata_buddha",
>>> + .id_table = pata_buddha_zorro_tbl,
>>> + .probe = pata_buddha_probe,
>>> + .remove = pata_buddha_remove,
>>
>> I think that we should also add:
>>
>> .driver = {
>> .suppress_bind_attrs = true,
>> },
>>
>> to prevent the device from being unbinded (and thus ->remove called)
>> from the driver using sysfs interface.
>
> Interesting idea - here's my question now:
>
> My intention is to allow remove() for boards where we support IDE only (Buddha, Catweasel) - these are autoprobed via zorro_register_driver().
> This shouldn't affect the X-Surf case, as it's not autoprobed in this way anyway - and thus pata_buddha_driver isn't even used.
>
> Am I missing something? We want to inhibit module unloading (hence no module_exit()), but driver unbinding for Buddha/Catweasel should be fine to remain, right?

Indeed, pata_buddha_driver is not even used for X-Surf so this is not
an issue (please disregard my comment about suppress_bind_attrs).

>> Please also always check your patches with scripts/checkpatch.pl and
>> fix the reported issues:
>
> Apologies, must've been something in my coffee. I will.
>
>
> Thanks for the review, I'll send a new patch once my question above is resolved.
>
> Max
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

\
 
 \ /
  Last update: 2019-08-20 18:55    [W:0.077 / U:3.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site