Merge branch 'linus' into cpus4096
[pandora-kernel.git] / arch / arm / mach-pxa / corgi_pm.c
index 0a85f70..e91c0f2 100644 (file)
@@ -26,6 +26,7 @@
 #include <asm/arch/sharpsl.h>
 #include <asm/arch/corgi.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/arch/pxa2xx-regs.h>
 #include <asm/arch/pxa2xx-gpio.h>
 #include "sharpsl.h"
 
@@ -204,7 +205,9 @@ static struct sharpsl_charger_machinfo corgi_pm_machinfo = {
        .read_devdata    = corgipm_read_devdata,
        .charger_wakeup  = corgi_charger_wakeup,
        .should_wakeup   = corgi_should_wakeup,
+#ifdef CONFIG_BACKLIGHT_CORGI
        .backlight_limit = corgibl_limit_intensity,
+#endif
        .charge_on_volt   = SHARPSL_CHARGE_ON_VOLT,
        .charge_on_temp   = SHARPSL_CHARGE_ON_TEMP,
        .charge_acin_high = SHARPSL_CHARGE_ON_ACIN_HIGH,
@@ -226,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;