Skip to content

Introduce builtin_driver and use it for non-modular code

Paul Gortmaker linux-arm-kernel linux-clk linux-pm linux-tegra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7platform_device: better support builtin boilerplate avoidanceinclude/linux/device.h include/linux/platform_device.h+45 -05 replies
2/7drivers/platform: Convert non-modular pdev_bus to use builtin_driver_registerdrivers/platform/goldfish/pdev_bus.c+1 -110 replies
3/7drivers/cpuidle: Convert non-modular drivers to use builtin_driver_registerdrivers/cpuidle/cpuidle-at91.c drivers/cpuidle/cpuidle-calxeda.c drivers/cpuidle/cpuidle-zynq.c+3 -61 reply
4/7drivers/cpufreq: Convert non-modular drivers to use builtin_driver_registerdrivers/cpufreq/exynos-cpufreq.c drivers/cpufreq/s5pv210-cpufreq.c+2 -27 replies
5/7drivers/soc: Convert non-modular tegra/pmc to use builtin_driver_registerdrivers/soc/tegra/pmc.c+1 -10 replies
6/7drivers/soc: Convert non-modular soc-realview to use builtin_driver_registerdrivers/soc/versatile/soc-realview.c+1 -11 reply
7/7drivers/power: Convert non-modular syscon-reboot to use builtin_driver_registerdrivers/power/reset/syscon-reboot.c+1 -11 reply

Reviews trailers per patch

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

PatchLinus WalleijSebastian ReichelViresh KumarMaxime RipardStephen Boyd
SeriesA-b A-b
1/7
2/7
3/7
4/7A-b
5/7
6/7A-b
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH 0/7] Introduce builtin_driver and use it for non-modular code

We see an increasing number of non-modular drivers using the modular_driver() type register functions. There are several downsides to this (as listed in the 1st commit log), so here we introduce similar non-modular macros for builtin drivers.

Then we convert builtin drivers (controlled by a bool Kconfig) by making the following type of changes:

module_platform_driver() ---> builtin_platform_driver()
module_platform_driver_probe() ---> builtin_platform_driver_probe().

The set of drivers that are converted here are just the ones that showed up as relying on an implicit include of <module.h> during a pending header cleanup. So we convert them here vs. adding an include of <module.h> to non-modular code to avoid compile fails. Additonal conversions can be done asynchronously at any time.

These changes, and the pending header cleanup are a refactoring of a larger series[1] into smaller, more easily reviewed chunks that share a common theme.

Note to maintainers: None of the conversion patches here can be taken into subtrees individually, since they all rely on the 1st patch to add the builtin macros. But I'll add Acks as requested.

Thanks,
Paul.

[1] https://marc.info/?l=linux-kernel&m=139033951228828
---

Cc Alexandre Courbot <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Axel Lin <[email protected]>
Cc Daniel Lezcano <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Dmitry Eremin-Solenikov <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Kukjin Kim <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Michal Simek <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Sebastian Reichel <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Viresh Kumar <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-pm at vger.kernel.org
Cc linux-tegra at vger.kernel.org