X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fparisc%2Flasi.c;h=bee510098ce86ce23963dbf442b084fa02400d94;hb=491539982aa01fa71de93c2a06ac5d890d4cf1e2;hp=cb84a4e84a2fd5a3e9aee87e75c3692066645e5d;hpb=9189674026e86e624b1ef1b4eb430e9ad19f9641;p=linux-2.6 diff --git a/drivers/parisc/lasi.c b/drivers/parisc/lasi.c index cb84a4e84a..bee510098c 100644 --- a/drivers/parisc/lasi.c +++ b/drivers/parisc/lasi.c @@ -150,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) { @@ -166,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; @@ -192,7 +193,7 @@ lasi_init_chip(struct parisc_device *dev) dev->irq = gsc_alloc_irq(&gsc_irq); if (dev->irq < 0) { printk(KERN_ERR "%s(): cannot get GSC irq\n", - __FUNCTION__); + __func__); kfree(lasi); return -EBUSY; } @@ -222,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; } @@ -233,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, };