RE: [PATCH 3/3] misc: enclosure: update sysfs api

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

 



Mariusz Tkaczyk wrote:
> Use DEVICE_ATTR RW, RO and WO macros. Update function names
> accordingly.
> No functional changes intended.

This looks like a nice cleanup to me, but I think you missed that
ses_set_active() updates ecomp->active. So even though
ses_enclosure_callbacks() does not publish get_active() it is still the
case that active needs to be DEVICE_ATTR_RW(). In fact with your change
in patch2 it now *requires* that ses_enclosure_callbacks() adds a
"get_active()" implementation. In that case it's going to need to cache
the last active setting which basically means dropping patch2 because it
seems more awkward to require "get" callbacks when cached value from the
last "set" is sufficient.



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux