platform driver: fix incorrect use of 'platform_bus_type' with 'struct device_driver'
This patch fixes the bug reported in http://bugzilla.kernel.org/show_bug.cgi?id=11681 . "Lots of device drivers register a 'struct device_driver' with the '.bus' member set to '&platform_bus_type'. This is wrong, since the platform_bus functions expect the 'struct device_driver' to be wrapped up in a 'struct platform_driver' which provides some additional callbacks (like suspend_late, resume_early). The effect may be that platform_suspend_late() uses bogus data outside the device_driver struct as a pointer pointer to the device driver's suspend_late() function or other hard to reproduce failures."(Lothar Wassmann) Signed-off-by:Ming Lei <tom.leiming@gmail.com> Acked-by:
Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by:
David Brownell <dbrownell@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
Showing
- arch/mips/basler/excite/excite_iodev.c 13 additions, 14 deletionsarch/mips/basler/excite/excite_iodev.c
- drivers/char/tpm/tpm_atmel.c 19 additions, 9 deletionsdrivers/char/tpm/tpm_atmel.c
- drivers/char/tpm/tpm_tis.c 19 additions, 9 deletionsdrivers/char/tpm/tpm_tis.c
- drivers/ide/au1xxx-ide.c 18 additions, 18 deletionsdrivers/ide/au1xxx-ide.c
- drivers/mtd/maps/pxa2xx-flash.c 19 additions, 18 deletionsdrivers/mtd/maps/pxa2xx-flash.c
- drivers/mtd/nand/excite_nandflash.c 13 additions, 12 deletionsdrivers/mtd/nand/excite_nandflash.c
- drivers/mtd/onenand/generic.c 13 additions, 13 deletionsdrivers/mtd/onenand/generic.c
- drivers/net/mipsnet.c 14 additions, 12 deletionsdrivers/net/mipsnet.c
- drivers/pcmcia/au1000_generic.c 24 additions, 13 deletionsdrivers/pcmcia/au1000_generic.c
- drivers/pcmcia/i82365.c 20 additions, 8 deletionsdrivers/pcmcia/i82365.c
- drivers/pcmcia/m32r_cfc.c 21 additions, 9 deletionsdrivers/pcmcia/m32r_cfc.c
- drivers/pcmcia/m32r_pcc.c 21 additions, 9 deletionsdrivers/pcmcia/m32r_pcc.c
- drivers/pcmcia/sa1100_generic.c 28 additions, 10 deletionsdrivers/pcmcia/sa1100_generic.c
- drivers/pcmcia/tcic.c 21 additions, 9 deletionsdrivers/pcmcia/tcic.c
- drivers/pcmcia/vrc4171_card.c 24 additions, 10 deletionsdrivers/pcmcia/vrc4171_card.c
- drivers/scsi/a4000t.c 14 additions, 12 deletionsdrivers/scsi/a4000t.c
- drivers/scsi/bvme6000_scsi.c 14 additions, 12 deletionsdrivers/scsi/bvme6000_scsi.c
- drivers/scsi/mvme16x_scsi.c 14 additions, 12 deletionsdrivers/scsi/mvme16x_scsi.c
- drivers/video/au1100fb.c 16 additions, 15 deletionsdrivers/video/au1100fb.c
- drivers/video/au1200fb.c 14 additions, 11 deletionsdrivers/video/au1200fb.c
Loading
Please register or sign in to comment