Re: [RFC PATCH] hwmon: (acpi_power_meter): Convert to hwmon_device_register_with_info

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

 



On Wed, 2022-05-11 at 17:10 -0700, Guenter Roeck wrote:
> On 5/11/22 09:53, Guenter Roeck wrote:
> [ ... ]
> 
> > > If this could happen in real life, we cannot rely on a fixed
> > > hwmon_chip_info and attribute_groups at driver registration
> > > phase.
> > > 
> > 
> > You have a point. However, if anything, that means that we might
> > have
> > to improve/extend the hwmon API to make attributes visible or
> > invisible
> > dynamically (ie add an API call such as hwmon_update_visibility()
> > and have it call sysfs_update_groups()).
> > 
> 
> Actually, adding a new API function isn't even necessary. A call to
> sysfs_update_groups(hwdev->groups) (where hwdev is the device pointer
> returned by the hwmon registration function) should do.
> 
> We could still add an api function for clarity, but all it would do
> would be to execute that call. That would be cleaner, but it isn't
> technically necessary.

Agreed.
Calling sysfs_update_groups() should be sufficient.

Given that Labbe already has done a lot of work on this conversion, I
will leave this to Labbe.

thanks,
rui





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux