mbox series

[0/3] hwmon: (oxp-sensors) Refactor probe() and init() and remove devm_add_groups()

Message ID 20230717124013.38796-2-samsagax@gmail.com (mailing list archive)
Headers show
Series hwmon: (oxp-sensors) Refactor probe() and init() and remove devm_add_groups() | expand

Message

Joaquín Ignacio Aramendía July 17, 2023, 12:40 p.m. UTC
Remove the use of devm_add_groups() in favour of dev_groups in platform
driver structure. This will allow for removal of the function as it was
intended in Greg's email[1].

Also since the driver is not hotpluggable move al the initialization and
detection logic to init() instead of probe() so we don't instantiate the
driver if the detection fails.

[1] Link: https://lore.kernel.org/linux-hwmon/ZKW7WuP0T9QdCR+G@google.com/

Joaquín Ignacio Aramendía (3):
  hwmon: (oxp-sensors) Move tt_toggle attribute to dev_groups
  hwmon: (oxp-sensors) Move board detection to the init function
  hwmon: (oxp-sensors) Refactor init() and remove probe()

 drivers/hwmon/oxp-sensors.c | 81 +++++++++++++++++++++----------------
 1 file changed, 46 insertions(+), 35 deletions(-)