public inbox for linux-aspeed@lists.ozlabs.org
 help / color / mirror / Atom feed
* [PATCH 0/6] thermal: Introduce devm_thermal_of_cooling_device_register
@ 2019-04-18 19:58 Guenter Roeck
  2019-04-18 19:58 ` [PATCH 1/6] " Guenter Roeck
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Guenter Roeck @ 2019-04-18 19:58 UTC (permalink / raw)
  To: linux-aspeed

thermal_of_cooling_device_register() and thermal_cooling_device_register()
are typically called from driver probe functions, and
thermal_cooling_device_unregister() is called from remove functions. This
makes both a perfect candidate for device managed functions.

Introduce devm_thermal_of_cooling_device_register(). This function can
also be used to replace thermal_cooling_device_register() by passing a NULL
pointer as device node. The new function requires both struct device *
and struct device_node * as parameters since the struct device_node *
parameter is not always identical to dev->of_node.

Don't introduce a device managed remove function since it is not needed
at this point.

The patch series introduces the new function and then converts various
hwmon drivers to use it.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-05-20 15:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-18 19:58 [PATCH 0/6] thermal: Introduce devm_thermal_of_cooling_device_register Guenter Roeck
2019-04-18 19:58 ` [PATCH 1/6] " Guenter Roeck
2019-05-01 16:48   ` Guenter Roeck
2019-05-03  8:04     ` Daniel Lezcano
2019-05-11 19:04   ` Eduardo Valentin
2019-05-11 20:22     ` Guenter Roeck
2019-04-18 19:58 ` [PATCH 2/6] hwmon: (aspeed-pwm-tacho) Use devm_thermal_of_cooling_device_register Guenter Roeck
2019-04-18 20:35   ` Patrick Venture
2019-04-18 19:58 ` [PATCH 3/6] hwmon: (gpio-fan) " Guenter Roeck
2019-04-18 19:58 ` [PATCH 4/6] hwmon: (mlxreg-fan) " Guenter Roeck
2019-04-18 19:58 ` [PATCH 5/6] hwmon: (npcm750-pwm-fan) " Guenter Roeck
2019-04-18 19:58 ` [PATCH 6/6] hwmon: (pwm-fan) " Guenter Roeck
2019-05-20 15:21   ` Marek Szyprowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox