diff options
Diffstat (limited to 'drivers/misc/tifm_7xx1.c')
-rw-r--r-- | drivers/misc/tifm_7xx1.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c index b1748669e05b..1ba8754e9383 100644 --- a/drivers/misc/tifm_7xx1.c +++ b/drivers/misc/tifm_7xx1.c | |||
@@ -48,7 +48,7 @@ static void tifm_7xx1_remove_media(void *adapter) | |||
48 | printk(KERN_INFO DRIVER_NAME | 48 | printk(KERN_INFO DRIVER_NAME |
49 | ": demand removing card from socket %d\n", cnt); | 49 | ": demand removing card from socket %d\n", cnt); |
50 | sock = fm->sockets[cnt]; | 50 | sock = fm->sockets[cnt]; |
51 | fm->sockets[cnt] = 0; | 51 | fm->sockets[cnt] = NULL; |
52 | fm->remove_mask &= ~(1 << cnt); | 52 | fm->remove_mask &= ~(1 << cnt); |
53 | 53 | ||
54 | writel(0x0e00, sock->addr + SOCK_CONTROL); | 54 | writel(0x0e00, sock->addr + SOCK_CONTROL); |
@@ -118,7 +118,7 @@ static irqreturn_t tifm_7xx1_isr(int irq, void *dev_id) | |||
118 | return IRQ_HANDLED; | 118 | return IRQ_HANDLED; |
119 | } | 119 | } |
120 | 120 | ||
121 | static tifm_media_id tifm_7xx1_toggle_sock_power(char *sock_addr, int is_x2) | 121 | static tifm_media_id tifm_7xx1_toggle_sock_power(char __iomem *sock_addr, int is_x2) |
122 | { | 122 | { |
123 | unsigned int s_state; | 123 | unsigned int s_state; |
124 | int cnt; | 124 | int cnt; |
@@ -163,7 +163,8 @@ static tifm_media_id tifm_7xx1_toggle_sock_power(char *sock_addr, int is_x2) | |||
163 | return (readl(sock_addr + SOCK_PRESENT_STATE) >> 4) & 7; | 163 | return (readl(sock_addr + SOCK_PRESENT_STATE) >> 4) & 7; |
164 | } | 164 | } |
165 | 165 | ||
166 | inline static char *tifm_7xx1_sock_addr(char *base_addr, unsigned int sock_num) | 166 | inline static char __iomem * |
167 | tifm_7xx1_sock_addr(char __iomem *base_addr, unsigned int sock_num) | ||
167 | { | 168 | { |
168 | return base_addr + ((sock_num + 1) << 10); | 169 | return base_addr + ((sock_num + 1) << 10); |
169 | } | 170 | } |
@@ -176,7 +177,7 @@ static void tifm_7xx1_insert_media(void *adapter) | |||
176 | char *card_name = "xx"; | 177 | char *card_name = "xx"; |
177 | int cnt, ok_to_register; | 178 | int cnt, ok_to_register; |
178 | unsigned int insert_mask; | 179 | unsigned int insert_mask; |
179 | struct tifm_dev *new_sock = 0; | 180 | struct tifm_dev *new_sock = NULL; |
180 | 181 | ||
181 | if (!class_device_get(&fm->cdev)) | 182 | if (!class_device_get(&fm->cdev)) |
182 | return; | 183 | return; |
@@ -230,7 +231,7 @@ static void tifm_7xx1_insert_media(void *adapter) | |||
230 | if (!ok_to_register || | 231 | if (!ok_to_register || |
231 | device_register(&new_sock->dev)) { | 232 | device_register(&new_sock->dev)) { |
232 | spin_lock_irqsave(&fm->lock, flags); | 233 | spin_lock_irqsave(&fm->lock, flags); |
233 | fm->sockets[cnt] = 0; | 234 | fm->sockets[cnt] = NULL; |
234 | spin_unlock_irqrestore(&fm->lock, | 235 | spin_unlock_irqrestore(&fm->lock, |
235 | flags); | 236 | flags); |
236 | tifm_free_device(&new_sock->dev); | 237 | tifm_free_device(&new_sock->dev); |
@@ -390,7 +391,7 @@ static void tifm_7xx1_remove(struct pci_dev *dev) | |||
390 | 391 | ||
391 | tifm_remove_adapter(fm); | 392 | tifm_remove_adapter(fm); |
392 | 393 | ||
393 | pci_set_drvdata(dev, 0); | 394 | pci_set_drvdata(dev, NULL); |
394 | 395 | ||
395 | iounmap(fm->addr); | 396 | iounmap(fm->addr); |
396 | pci_intx(dev, 0); | 397 | pci_intx(dev, 0); |