From: Dmitry Baryshkov Date: Sat, 31 May 2008 15:17:32 +0000 (+0100) Subject: [ARM] 5073/1: spitz_pm: don't register devices on non-spitz machines X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5806d8abf6b152f23d057c2e6b9199892883a8df;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [ARM] 5073/1: spitz_pm: don't register devices on non-spitz machines Signed-off-by: Dmitry Baryshkov Acked-by: Richard Purdie Signed-off-by: Russell King --- diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 48396f4eb26..360354084ae 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "sharpsl.h" @@ -231,6 +232,10 @@ static int __devinit spitzpm_init(void) { int ret; + if (!machine_is_spitz() && !machine_is_akita() + && !machine_is_borzoi()) + return -ENODEV; + spitzpm_device = platform_device_alloc("sharpsl-pm", -1); if (!spitzpm_device) return -ENOMEM;