Skip to content

iio: adc: twl6030-gpadc: convert probe/remove cleanup to devm

Wanhui Fu linux-iio 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 2 repliesIn review
  2. v43 patches 1 replySuperseded
  3. v33 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v23 patches4 repliesSuperseded

Changes in v5 from the cover letter

- Pass the GPADC private data to the interrupt cleanup action and read the IRQ mask from it. Thanks, Andy!
- Move irq_mask after pdata to keep the original member offsets and place the three bytes of padding at the end. On ARM32, pahole reports 48 bytes with mutex debugging disabled and 52 bytes with it enabled, matching the v4 size in both builds.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3iio: adc: twl6030-gpadc: use devm_add_action_or_reset() to disable IRQdrivers/iio/adc/twl6030-gpadc.c+13 -51 reply
2/3iio: adc: twl6030-gpadc: switch to devm_iio_device_register()drivers/iio/adc/twl6030-gpadc.c+5 -110 replies
3/3iio: adc: twl6030-gpadc: delete redundant dev_err() messages in probedrivers/iio/adc/twl6030-gpadc.c+4 -120 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndy Shevchenko
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/3] iio: adc: twl6030-gpadc: convert probe/remove cleanup to devm

This series uses devm to manage interrupt masking and IIO device registration in the TWL6030 GPADC driver. It also removes redundant I2C error messages from probe.

Patch 1 registers the interrupt masking action with devm. Patch 2 uses devm for IIO device registration and mutex initialization. Patch 3 removes redundant probe error messages.

Compile-tested passed.

Changes in v5:
- Pass the GPADC private data to the interrupt cleanup action and read the IRQ mask from it. Thanks, Andy!
- Move irq_mask after pdata to keep the original member offsets and place the three bytes of padding at the end. On ARM32, pahole reports 48 bytes with mutex debugging disabled and 52 bytes with it enabled, matching the v4 size in both builds.

Changes in v4:
- Store the IRQ mask in struct twl6030_gpadc_data. Thanks, Andy!
- Use devm_mutex_init() and check its return value. Thanks, Joshua!
- Wrap the commit messages to 75 characters.

Changes in v3:
- Add details to Patch 1's commit message.
- No code changes. Patches 2 and 3 are unchanged.

Changes in v2:
- Use devm_add_action_or_reset() instead of a goto error path. Thanks, Jonathan!
- Convert to devm_iio_device_register() and drop remove(). Thanks, Jonathan!
- Drop redundant dev_err() messages after twl_i2c_write_u8(). Thanks, Andreas!

Wanhui Fu (3):
iio: adc: twl6030-gpadc: use devm_add_action_or_reset() to disable IRQ
iio: adc: twl6030-gpadc: switch to devm_iio_device_register()
iio: adc: twl6030-gpadc: delete redundant dev_err() messages in probe

 drivers/iio/adc/twl6030-gpadc.c | 50 +++++++++++++++------------------
 1 file changed, 22 insertions(+), 28 deletions(-)

base-commit: 25faec9ce61c01fb45abf812a222c5b43c3cd5c5

Signature · 1 line
2.25.1