linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/2] staging: iio: adc: ad7280a: use devm API when applicable
@ 2018-11-11 15:59 Slawomir Stepien
  2018-11-11 15:59 ` [PATCH v6 1/2] staging: iio: adc: ad7280a: power down the device on error in probe Slawomir Stepien
  2018-11-11 15:59 ` [PATCH v6 2/2] staging: iio: adc: ad7280a: use devm_* APIs Slawomir Stepien
  0 siblings, 2 replies; 6+ messages in thread
From: Slawomir Stepien @ 2018-11-11 15:59 UTC (permalink / raw)
  To: lars, Michael.Hennerich, jic23, knaack.h, pmeerw; +Cc: linux-iio, gregkh

This small series of patches will enable devm API in the driver when applicable.

The patch contains two parts: 1st part enables powering down the device in
probe function, 2nd part changes the API to devm when applicable.

The first commit has been added for better visualization of what will happen
when the devm API is used - the whole remove function is not needed, but we
still need to power down the device from somewhere.

History:

Since v5:
* split the patch into two commits: (1) power down the device in probe, (2) use
  devm API when applicable
* devm_add_action -> devm_add_action_or_reset

Since v4:
* on devm_add_action fail, call the action on error handling
* move the devm_add_action just after spi_setup - this will call the action on
  more error paths in probe (fail in: ad7280_chain_setup, ad7280_channel_init,
  ad7280_attr_init)

Since v3:
* use devm_add_action with software power down
* the whole remove call back is not needed anymore

Since v2:
* iio_device_register -> devm_iio_device_register

Since v1:
* request_threaded_irq -> devm_request_threaded_irq

Slawomir Stepien (2):
  staging: iio: adc: ad7280a: power down the device on error in probe
  staging: iio: adc: ad7280a: use devm_* APIs

 drivers/staging/iio/adc/ad7280a.c | 95 +++++++++++++------------------
 1 file changed, 39 insertions(+), 56 deletions(-)

-- 
2.19.1

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

end of thread, other threads:[~2018-11-12  6:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-11 15:59 [PATCH v6 0/2] staging: iio: adc: ad7280a: use devm API when applicable Slawomir Stepien
2018-11-11 15:59 ` [PATCH v6 1/2] staging: iio: adc: ad7280a: power down the device on error in probe Slawomir Stepien
2018-11-11 17:00   ` Jonathan Cameron
2018-11-11 15:59 ` [PATCH v6 2/2] staging: iio: adc: ad7280a: use devm_* APIs Slawomir Stepien
2018-11-11 17:04   ` Jonathan Cameron
2018-11-11 20:23     ` Slawomir Stepien

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).