Skip to content

Commit

Permalink
hwmon: Document the use of devres functions
Browse files Browse the repository at this point in the history
devres functions are the preferred means to allocate resources in hwmon drivers.
Document it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Guenter Roeck committed Jul 22, 2012
1 parent d00985f commit 3fafb0c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Documentation/hwmon/submitting-patches
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ increase the chances of your change being accepted.
review more difficult. It may also result in code which is more complicated
than necessary. Use inline functions or just regular functions instead.

* Use devres functions whenever possible to allocate resources. For rationale
and supported functions, please see Documentation/driver-model/devres.txt.

* If the driver has a detect function, make sure it is silent. Debug messages
and messages printed after a successful detection are acceptable, but it
must not print messages such as "Chip XXX not found/supported".
Expand Down

0 comments on commit 3fafb0c

Please sign in to comment.