• Grant Likely's avatar
    of: make of_(un)register_platform_driver common code · 0763ed23
    Grant Likely authored
    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: default avatarGrant Likely <grant.likely@secretlab.ca>
    Acked-by: default avatarDavid 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: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    0763ed23
of_platform.h 990 Bytes