]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Fix platform drivers that crash on suspend/resume
authorDarrick J. Wong <djwong@us.ibm.com>
Wed, 12 Nov 2008 21:25:00 +0000 (13:25 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 Nov 2008 22:54:44 +0000 (14:54 -0800)
commit095d1c96367e0af6b566c9ec7eeae62f0a57d64e
tree368945afef5397916822bd335101f3b7b0ead408
parent5cf84123715843d404211bc57487ecbadcd3d4c2
Fix platform drivers that crash on suspend/resume

commit fe2d5ffc74a1de6a31e9fd65b65cce72d881edf7 upstream.

It turns out that if one registers a struct platform_device, the
platform device code expects that platform_device.device->driver points
to a struct driver inside a struct platform_driver.

This is not the case with the ipmi-si, ipmi-msghandler and ibmaem
drivers, which causes the suspend/resume hook functions to jump off into
nowhere, causing a crash.  Make this assumption hold true for these
three drivers.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/ipmi/ipmi_msghandler.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/hwmon/ibmaem.c