X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fparisc%2Flasi.c;h=e65727ca9fc070ed2233289a33498b403d3e229c;hb=73a97f4f6e53545b71f5c14ae2cb70a4b8d3cf63;hp=731855053392995fa6ad4530314ed588b9249056;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/parisc/lasi.c b/drivers/parisc/lasi.c index 7318550..e65727c 100644 --- a/drivers/parisc/lasi.c +++ b/drivers/parisc/lasi.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -108,7 +107,7 @@ lasi_init_irq(struct gsc_asic *this_lasi) #else -void __init lasi_led_init(unsigned long lasi_hpa) +static void __init lasi_led_init(unsigned long lasi_hpa) { unsigned long datareg; @@ -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) { @@ -164,19 +163,19 @@ static void lasi_power_off(void) gsc_writel(0x02, datareg); } -int __init -lasi_init_chip(struct parisc_device *dev) +static 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; @@ -193,7 +192,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; } @@ -223,7 +222,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 +233,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, };