[PATCH 00/11] irqchip: Pass platform device to platform drivers

Johan Hovold posted 11 patches 3 months, 3 weeks ago
There is a newer version of this series
drivers/irqchip/irq-bcm2712-mip.c          | 11 ++-----
drivers/irqchip/irq-bcm7038-l1.c           | 12 +++----
drivers/irqchip/irq-bcm7120-l2.c           | 28 +++++-----------
drivers/irqchip/irq-brcmstb-l2.c           | 25 +++++++--------
drivers/irqchip/irq-imx-mu-msi.c           | 28 +++++++---------
drivers/irqchip/irq-mchp-eic.c             |  5 +--
drivers/irqchip/irq-meson-gpio.c           |  5 +--
drivers/irqchip/irq-qcom-mpm.c             |  6 ++--
drivers/irqchip/irq-renesas-rzg2l.c        | 37 ++++++----------------
drivers/irqchip/irq-renesas-rzv2h.c        | 32 ++++++-------------
drivers/irqchip/irq-starfive-jh8100-intc.c |  6 ++--
drivers/irqchip/irqchip.c                  | 10 +++---
drivers/irqchip/qcom-irq-combiner.c        |  2 +-
drivers/irqchip/qcom-pdc.c                 |  5 +--
include/linux/irqchip.h                    |  8 ++++-
15 files changed, 85 insertions(+), 135 deletions(-)
[PATCH 00/11] irqchip: Pass platform device to platform drivers
Posted by Johan Hovold 3 months, 3 weeks ago
The IRQCHIP_PLATFORM_DRIVER macros can be used to convert OF irqchip
drivers to platform drivers but currently reuse the OF init callback
prototype that only takes OF nodes as arguments. This forces drivers to
do reverse lookups of their struct devices during probe if they need
them for things like dev_printk() and device managed resources.

Half of the drivers doing reverse lookups also currently fail to release
the additional reference taken during the lookup, while other drivers
have had the reference leak plugged in various ways (e.g. using
non-intuitive cleanup constructs which still confuse static checkers).

Switch to using a probe callback that takes a platform device as its
first argument to simplify drivers and plug the remaining (mostly
benign) reference leaks.

Included are also some related preparatory fixes for an OF node
reference imbalance and section mismatches due to misplaced __init
markers (in some cases left over from platform driver conversions).

Johan


Johan Hovold (11):
  irqchip/bcm2712-mip: Fix OF node reference imbalance
  irqchip/bcm2712-mip: Fix section mismatch
  irqchip/irq-bcm7038-l1: Fix section mismatch
  irqchip/irq-bcm7120-l2: Fix section mismatch
  irqchip/irq-brcmstb-l2: Fix section mismatch
  irqchip/imx-mu-msi: Fix section mismatch
  irqchip/renesas-rzg2l: Fix section mismatch
  irqchip/starfive-jh8100: Fix section mismatch
  irqchip/qcom-irq-combiner: Fix section mismatch
  irqchip: Drop leftover brackets
  irqchip: Pass platform device to platform drivers

 drivers/irqchip/irq-bcm2712-mip.c          | 11 ++-----
 drivers/irqchip/irq-bcm7038-l1.c           | 12 +++----
 drivers/irqchip/irq-bcm7120-l2.c           | 28 +++++-----------
 drivers/irqchip/irq-brcmstb-l2.c           | 25 +++++++--------
 drivers/irqchip/irq-imx-mu-msi.c           | 28 +++++++---------
 drivers/irqchip/irq-mchp-eic.c             |  5 +--
 drivers/irqchip/irq-meson-gpio.c           |  5 +--
 drivers/irqchip/irq-qcom-mpm.c             |  6 ++--
 drivers/irqchip/irq-renesas-rzg2l.c        | 37 ++++++----------------
 drivers/irqchip/irq-renesas-rzv2h.c        | 32 ++++++-------------
 drivers/irqchip/irq-starfive-jh8100-intc.c |  6 ++--
 drivers/irqchip/irqchip.c                  | 10 +++---
 drivers/irqchip/qcom-irq-combiner.c        |  2 +-
 drivers/irqchip/qcom-pdc.c                 |  5 +--
 include/linux/irqchip.h                    |  8 ++++-
 15 files changed, 85 insertions(+), 135 deletions(-)

-- 
2.49.1