of: make of_(un)register_platform_driver common code
authorGrant Likely <grant.likely@secretlab.ca>
Thu, 30 Apr 2009 22:08:50 +0000 (15:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 2 May 2009 22:36:10 +0000 (15:36 -0700)
commit0763ed2355198cdef2f6a2098e9d52eb1fe4365d
tree44ca8fdbfa940425a11adfa0fd6ac739a3350792
parent74641f584da8eccf30becfbb5507ab457187db22
of: make of_(un)register_platform_driver common code

Some drivers using of_register_platform_driver() wrapper break on sparc
because the wrapper isn't in the header file.  This patch moves it from
Microblaze and PowerPC implementations and makes it common code.

Fixes this sparc64 allmodconfig build error (at least):

drivers/leds/leds-gpio.c: In function `gpio_led_init':
drivers/leds/leds-gpio.c:295: error: implicit declaration of function `of_register_platform_driver'
drivers/leds/leds-gpio.c: In function `gpio_led_exit':
drivers/leds/leds-gpio.c:311: error: implicit declaration of function `of_unregister_platform_driver'

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/microblaze/include/asm/of_platform.h
arch/powerpc/include/asm/of_platform.h
include/linux/of_platform.h