diff options
-rw-r--r-- | drivers/misc/tifm_7xx1.c | 13 | ||||
-rw-r--r-- | drivers/misc/tifm_core.c | 2 | ||||
-rw-r--r-- | drivers/mmc/tifm_sd.c | 14 |
3 files changed, 15 insertions, 14 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); |
diff --git a/drivers/misc/tifm_core.c b/drivers/misc/tifm_core.c index cca5f8522469..ee326136d03b 100644 --- a/drivers/misc/tifm_core.c +++ b/drivers/misc/tifm_core.c | |||
@@ -157,7 +157,7 @@ struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id) | |||
157 | dev->wq = create_singlethread_workqueue(dev->wq_name); | 157 | dev->wq = create_singlethread_workqueue(dev->wq_name); |
158 | if (!dev->wq) { | 158 | if (!dev->wq) { |
159 | kfree(dev); | 159 | kfree(dev); |
160 | return 0; | 160 | return NULL; |
161 | } | 161 | } |
162 | dev->dev.parent = fm->dev; | 162 | dev->dev.parent = fm->dev; |
163 | dev->dev.bus = &tifm_bus_type; | 163 | dev->dev.bus = &tifm_bus_type; |
diff --git a/drivers/mmc/tifm_sd.c b/drivers/mmc/tifm_sd.c index 6d23dc08d169..2bacff60913d 100644 --- a/drivers/mmc/tifm_sd.c +++ b/drivers/mmc/tifm_sd.c | |||
@@ -501,13 +501,13 @@ static void tifm_sd_end_cmd(void *data) | |||
501 | struct tifm_dev *sock = host->dev; | 501 | struct tifm_dev *sock = host->dev; |
502 | struct mmc_host *mmc = tifm_get_drvdata(sock); | 502 | struct mmc_host *mmc = tifm_get_drvdata(sock); |
503 | struct mmc_request *mrq; | 503 | struct mmc_request *mrq; |
504 | struct mmc_data *r_data = 0; | 504 | struct mmc_data *r_data = NULL; |
505 | unsigned long flags; | 505 | unsigned long flags; |
506 | 506 | ||
507 | spin_lock_irqsave(&sock->lock, flags); | 507 | spin_lock_irqsave(&sock->lock, flags); |
508 | 508 | ||
509 | mrq = host->req; | 509 | mrq = host->req; |
510 | host->req = 0; | 510 | host->req = NULL; |
511 | host->state = IDLE; | 511 | host->state = IDLE; |
512 | 512 | ||
513 | if (!mrq) { | 513 | if (!mrq) { |
@@ -546,7 +546,7 @@ static void tifm_sd_request_nodma(struct mmc_host *mmc, struct mmc_request *mrq) | |||
546 | struct tifm_dev *sock = host->dev; | 546 | struct tifm_dev *sock = host->dev; |
547 | unsigned long flags; | 547 | unsigned long flags; |
548 | struct mmc_data *r_data = mrq->cmd->data; | 548 | struct mmc_data *r_data = mrq->cmd->data; |
549 | char *t_buffer = 0; | 549 | char *t_buffer = NULL; |
550 | 550 | ||
551 | if (r_data) { | 551 | if (r_data) { |
552 | t_buffer = kmap(r_data->sg->page); | 552 | t_buffer = kmap(r_data->sg->page); |
@@ -613,13 +613,13 @@ static void tifm_sd_end_cmd_nodma(void *data) | |||
613 | struct tifm_dev *sock = host->dev; | 613 | struct tifm_dev *sock = host->dev; |
614 | struct mmc_host *mmc = tifm_get_drvdata(sock); | 614 | struct mmc_host *mmc = tifm_get_drvdata(sock); |
615 | struct mmc_request *mrq; | 615 | struct mmc_request *mrq; |
616 | struct mmc_data *r_data = 0; | 616 | struct mmc_data *r_data = NULL; |
617 | unsigned long flags; | 617 | unsigned long flags; |
618 | 618 | ||
619 | spin_lock_irqsave(&sock->lock, flags); | 619 | spin_lock_irqsave(&sock->lock, flags); |
620 | 620 | ||
621 | mrq = host->req; | 621 | mrq = host->req; |
622 | host->req = 0; | 622 | host->req = NULL; |
623 | host->state = IDLE; | 623 | host->state = IDLE; |
624 | 624 | ||
625 | if (!mrq) { | 625 | if (!mrq) { |
@@ -644,7 +644,7 @@ static void tifm_sd_end_cmd_nodma(void *data) | |||
644 | r_data->bytes_xfered += r_data->blksz - | 644 | r_data->bytes_xfered += r_data->blksz - |
645 | readl(sock->addr + SOCK_MMCSD_BLOCK_LEN) + 1; | 645 | readl(sock->addr + SOCK_MMCSD_BLOCK_LEN) + 1; |
646 | } | 646 | } |
647 | host->buffer = 0; | 647 | host->buffer = NULL; |
648 | host->buffer_pos = 0; | 648 | host->buffer_pos = 0; |
649 | host->buffer_size = 0; | 649 | host->buffer_size = 0; |
650 | } | 650 | } |
@@ -895,7 +895,7 @@ static void tifm_sd_remove(struct tifm_dev *sock) | |||
895 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR); | 895 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR); |
896 | writel(0, sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET); | 896 | writel(0, sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET); |
897 | 897 | ||
898 | tifm_set_drvdata(sock, 0); | 898 | tifm_set_drvdata(sock, NULL); |
899 | mmc_free_host(mmc); | 899 | mmc_free_host(mmc); |
900 | } | 900 | } |
901 | 901 | ||