From: Dmitry Baryshkov Date: Sat, 31 May 2008 15:16:54 +0000 (+0100) Subject: [ARM] 5072/1: corgi_pm: don't register devices on non-corgi machines X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=043fbc099af0fc0ec94112c7235b7544147149f4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [ARM] 5072/1: corgi_pm: don't register devices on non-corgi machines Signed-off-by: Dmitry Baryshkov Acked-by: Richard Purdie Signed-off-by: Russell King --- diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c index 53c4499ebdbc..e91c0f26c412 100644 --- a/arch/arm/mach-pxa/corgi_pm.c +++ b/arch/arm/mach-pxa/corgi_pm.c @@ -229,6 +229,10 @@ static int __devinit corgipm_init(void) { int ret; + if (!machine_is_corgi() && !machine_is_shepherd() + && !machine_is_husky()) + return -ENODEV; + corgipm_device = platform_device_alloc("sharpsl-pm", -1); if (!corgipm_device) return -ENOMEM;