Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / parisc / lasi.c
index 7318550..cb3d281 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/pm.h>
-#include <linux/slab.h>
 #include <linux/types.h>
 
 #include <asm/io.h>
@@ -151,7 +150,7 @@ void __init lasi_led_init(unsigned long lasi_hpa)
  * 
  */
 
-static unsigned long lasi_power_off_hpa;
+static unsigned long lasi_power_off_hpa __read_mostly;
 
 static void lasi_power_off(void)
 {
@@ -167,16 +166,17 @@ static void lasi_power_off(void)
 int __init
 lasi_init_chip(struct parisc_device *dev)
 {
+       extern void (*chassis_power_off)(void);
        struct gsc_asic *lasi;
        struct gsc_irq gsc_irq;
        int ret;
 
-       lasi = kmalloc(sizeof(*lasi), GFP_KERNEL);
+       lasi = kzalloc(sizeof(*lasi), GFP_KERNEL);
        if (!lasi)
                return -ENOMEM;
 
        lasi->name = "Lasi";
-       lasi->hpa = dev->hpa;
+       lasi->hpa = dev->hpa.start;
 
        /* Check the 4-bit (yes, only 4) version register */
        lasi->version = gsc_readl(lasi->hpa + LASI_VER) & 0xf;
@@ -223,7 +223,7 @@ lasi_init_chip(struct parisc_device *dev)
         * ensure that only the first LASI (the one controlling the power off)
         * should set the HPA here */
        lasi_power_off_hpa = lasi->hpa;
-       pm_power_off = lasi_power_off;
+       chassis_power_off = lasi_power_off;
        
        return ret;
 }
@@ -234,7 +234,7 @@ static struct parisc_device_id lasi_tbl[] = {
 };
 
 struct parisc_driver lasi_driver = {
-       .name =         "Lasi",
+       .name =         "lasi",
        .id_table =     lasi_tbl,
        .probe =        lasi_init_chip,
 };