Skip to content

mfd: Make max drivers explicitly non-modular

Paul Gortmaker lkml 2 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 5 repliesApplied
  2. v17 patches 12 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5mfd: max8925-i2c: Make it explicitly non-modulardrivers/mfd/max8925-i2c.c+1 -131 reply
2/5mfd: max8997: Make it explicitly non-modulardrivers/mfd/max8997.c+3 -271 reply
3/5mfd: max8998: Make it explicitly non-modulardrivers/mfd/max8998.c+1 -261 reply
4/5mfd: max77620: make it explicitly non-modulardrivers/mfd/max77620.c+2 -101 reply
5/5mfd: max77843: Make it explicitly non-modulardrivers/mfd/max77843.c+2 -221 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/5] mfd: Make max drivers explicitly non-modular

For anyone new to the underlying goal of this cleanup, we are trying to make driver code consistent with the Makefiles/Kconfigs that control them.

This means not using modular functions/macros for drivers that can never be built as a module. Some of the other downfalls this leads to are:

(1) it is easy to accidentally write unused module_exit and remove code
(2) it can be misleading when reading the source, thinking it can be modular when the Makefile and/or Kconfig prohibit it
(3) it requires the include of the module.h header file which in turn includes nearly everything else, thus adding to CPP overhead.
(4) it gets copied/replicated into other drivers and spreads like weeds.

There are quite a few in the mfd space, so rather than send a large series, I'll try and batch them up into reasonable sized queues. To that end, here we fix up all the maxim drivers as the 1st mfd batch.

As always, the option exists for someone with the hardware and the desire to extend the functionality to make any given driver tristate. But given the number of these tree wide and the fact that I can't test that new extended functionality in all cases, I just make the code consistent with the existing Kconfig/Makefile settings that restrict them to "bool".

Build tested on linux-next for arm, arm64 and x86-64 to ensure no typos or similar issues crept in.

Paul.
---

[v2: - drop two patches for drivers getting tristate conversion from JMC.
- fix up shortlog/subjects to match existing mfd style/convention.
- rebase to current linux-next and redo build testing. ]

[v1: https://lkml.kernel.org/r/[email protected] ]

Cc Chanwoo Choi <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Lee Jones <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc MyungJoo Ham <[email protected]>
Cc Samuel Ortiz <[email protected]>

Paul Gortmaker (5):
mfd: max8925-i2c: Make it explicitly non-modular
mfd: max8997: Make it explicitly non-modular
mfd: max8998: Make it explicitly non-modular
mfd: max77620: make it explicitly non-modular
mfd: max77843: Make it explicitly non-modular

 drivers/mfd/max77620.c    | 12 ++----------
 drivers/mfd/max77843.c    | 24 ++----------------------
 drivers/mfd/max8925-i2c.c | 14 +-------------
 drivers/mfd/max8997.c     | 30 +++---------------------------
 drivers/mfd/max8998.c     | 27 +--------------------------
 5 files changed, 9 insertions(+), 98 deletions(-)
Signature · 1 line
2.4.3