drivercore: revert addition of of_match to struct device
Commit b826291c , "drivercore/dt: add a match table pointer to struct device" added an of_match pointer to struct device to cache the of_match_table entry discovered at driver match time. This was unsafe because matching is not an atomic operation with probing a driver. If two or more drivers are attempted to be matched to a driver at the same time, then the cached matching entry pointer could get overwritten. This patch reverts the of_match cache pointer and reworks all users to call of_match_device() directly instead. Signed-off-by:Grant Likely <grant.likely@secretlab.ca>
Showing
- arch/powerpc/platforms/83xx/suspend.c 5 additions, 2 deletionsarch/powerpc/platforms/83xx/suspend.c
- arch/powerpc/sysdev/fsl_msi.c 5 additions, 2 deletionsarch/powerpc/sysdev/fsl_msi.c
- arch/sparc/kernel/pci_sabre.c 4 additions, 1 deletionarch/sparc/kernel/pci_sabre.c
- arch/sparc/kernel/pci_schizo.c 6 additions, 2 deletionsarch/sparc/kernel/pci_schizo.c
- drivers/atm/fore200e.c 5 additions, 2 deletionsdrivers/atm/fore200e.c
- drivers/char/hw_random/n2-drv.c 5 additions, 2 deletionsdrivers/char/hw_random/n2-drv.c
- drivers/char/ipmi/ipmi_si_intf.c 5 additions, 2 deletionsdrivers/char/ipmi/ipmi_si_intf.c
- drivers/char/xilinx_hwicap/xilinx_hwicap.c 9 additions, 5 deletionsdrivers/char/xilinx_hwicap/xilinx_hwicap.c
- drivers/edac/ppc4xx_edac.c 1 addition, 1 deletiondrivers/edac/ppc4xx_edac.c
- drivers/i2c/busses/i2c-mpc.c 6 additions, 3 deletionsdrivers/i2c/busses/i2c-mpc.c
- drivers/mmc/host/sdhci-of-core.c 5 additions, 2 deletionsdrivers/mmc/host/sdhci-of-core.c
- drivers/mtd/maps/physmap_of.c 5 additions, 2 deletionsdrivers/mtd/maps/physmap_of.c
- drivers/net/can/mscan/mpc5xxx_can.c 5 additions, 2 deletionsdrivers/net/can/mscan/mpc5xxx_can.c
- drivers/net/fs_enet/fs_enet-main.c 6 additions, 3 deletionsdrivers/net/fs_enet/fs_enet-main.c
- drivers/net/fs_enet/mii-fec.c 5 additions, 2 deletionsdrivers/net/fs_enet/mii-fec.c
- drivers/net/sunhme.c 5 additions, 2 deletionsdrivers/net/sunhme.c
- drivers/scsi/qlogicpti.c 5 additions, 2 deletionsdrivers/scsi/qlogicpti.c
- drivers/tty/serial/of_serial.c 5 additions, 2 deletionsdrivers/tty/serial/of_serial.c
- drivers/usb/gadget/fsl_qe_udc.c 5 additions, 2 deletionsdrivers/usb/gadget/fsl_qe_udc.c
- drivers/watchdog/mpc8xxx_wdt.c 5 additions, 2 deletionsdrivers/watchdog/mpc8xxx_wdt.c
Please register or sign in to comment