Are single- or multi- function functions preferred?

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

 



Hi,

I'm in the process of cleaning up a patch that adds auto pwm mode
to it87. In the existing it87 driver each sysfs attribute maps to
exactly one (if read-only) or 2 (if read/write) functions. Whereas
in the vt1211 driver (for instance) multiple sysfs attributes map
to a single pair of "show_*" and "set_*" "multi-functions" that
switch on sensor_attr_2->nr to determine what to do. Is one of
these styles preferred over the other, and why?

Thanks,
Frank








[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux