Re: [PATCH] gpio: gpio-tb10x: remove incorrect __exit markup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 18, 2015 at 5:55 PM, Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
> On Tue, Mar 17, 2015 at 01:30:15PM +0100, Linus Walleij wrote:
>> On Mon, Mar 9, 2015 at 7:04 PM, Dmitry Torokhov
>> <dmitry.torokhov@xxxxxxxxx> wrote:
>>
>> > Even if bus is not hot-pluggable, the devices can be unbound from the
>> > driver via sysfs, so we should not be using __exit annotations on
>> > remove() methods. The only exception is drivers registered with
>> > platform_driver_probe() which specifically disables sysfs bind/unbind
>> > attributes.
>> >
>> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
>>
>> I prefer to have this fixed by setting
>> .suppress_bind_attrs = true
>> in the struct device_driver .drv portion of the device driver,
>> so the driver cannot be removed from sysfs.
>>
>> So platform_driver_probe() isn't really the only exception,
>> there is a way to do the same supression on ordinary drivers
>> if we know we won't fiddle with them from sysfs.
>
> Yes, you are right, setting suppress_bind_attrs will work too.
>
>>
>> Can you make a patch as per above (alternatively tell me
>> how wrong I am...)
>
> Unfortunately I won't be able to do that as I can't provide
> justification for such change (i.e. I do not know why you want to
> disable unbinding while still keeping the remove() implementation.

You are right, I want a patch deleting the remove() implementation
and setting the .suppress_bind_attrs = true at the same time.

For a bool driver of this type (typically compiled in and probed
at boot) that makes most sense to me.

Well I guess there are a ton of drivers that should be done like
that ... just wanna start somewhere.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux