aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2013-06-06 04:24:15 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-06 15:57:41 -0400
commit40ca0209bae06eeede0f861e988b4bb38ae9cf98 (patch)
tree8b9f36fba1ff3c7b30a5cd82064ef3f0222ba9ba /drivers/pcmcia
parente39506b466edcda2a7e9d0174d7987ae654137b7 (diff)
pcmcia: at91_cf: convert to dev_ print functions
Convert all pr_* functions to equivalent dev_* functions and drop the driver_name variable. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/at91_cf.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index 1b2c6317c772..4eec14bcb7b8 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -41,8 +41,6 @@
41 41
42/*--------------------------------------------------------------------------*/ 42/*--------------------------------------------------------------------------*/
43 43
44static const char driver_name[] = "at91_cf";
45
46struct at91_cf_socket { 44struct at91_cf_socket {
47 struct pcmcia_socket socket; 45 struct pcmcia_socket socket;
48 46
@@ -76,7 +74,7 @@ static irqreturn_t at91_cf_irq(int irq, void *_cf)
76 /* kick pccard as needed */ 74 /* kick pccard as needed */
77 if (present != cf->present) { 75 if (present != cf->present) {
78 cf->present = present; 76 cf->present = present;
79 pr_debug("%s: card %s\n", driver_name, 77 dev_dbg(&cf->pdev->dev, "card %s\n",
80 present ? "present" : "gone"); 78 present ? "present" : "gone");
81 pcmcia_parse_events(&cf->socket, SS_DETECT); 79 pcmcia_parse_events(&cf->socket, SS_DETECT);
82 } 80 }
@@ -134,8 +132,8 @@ at91_cf_set_socket(struct pcmcia_socket *sock, struct socket_state_t *s)
134 /* toggle reset if needed */ 132 /* toggle reset if needed */
135 gpio_set_value(cf->board->rst_pin, s->flags & SS_RESET); 133 gpio_set_value(cf->board->rst_pin, s->flags & SS_RESET);
136 134
137 pr_debug("%s: Vcc %d, io_irq %d, flags %04x csc %04x\n", 135 dev_dbg(&cf->pdev->dev, "Vcc %d, io_irq %d, flags %04x csc %04x\n",
138 driver_name, s->Vcc, s->io_irq, s->flags, s->csc_mask); 136 s->Vcc, s->io_irq, s->flags, s->csc_mask);
139 137
140 return 0; 138 return 0;
141} 139}
@@ -171,10 +169,10 @@ static int at91_cf_set_io_map(struct pcmcia_socket *s, struct pccard_io_map *io)
171 */ 169 */
172 if (!(io->flags & (MAP_16BIT | MAP_AUTOSZ))) { 170 if (!(io->flags & (MAP_16BIT | MAP_AUTOSZ))) {
173 csr |= AT91_SMC_DBW_8; 171 csr |= AT91_SMC_DBW_8;
174 pr_debug("%s: 8bit i/o bus\n", driver_name); 172 dev_dbg(&cf->pdev->dev, "8bit i/o bus\n");
175 } else { 173 } else {
176 csr |= AT91_SMC_DBW_16; 174 csr |= AT91_SMC_DBW_16;
177 pr_debug("%s: 16bit i/o bus\n", driver_name); 175 dev_dbg(&cf->pdev->dev, "16bit i/o bus\n");
178 } 176 }
179 at91_ramc_write(0, AT91_SMC_CSR(cf->board->chipselect), csr); 177 at91_ramc_write(0, AT91_SMC_CSR(cf->board->chipselect), csr);
180 178
@@ -242,7 +240,7 @@ static int __init at91_cf_probe(struct platform_device *pdev)
242 status = gpio_request(board->det_pin, "cf_det"); 240 status = gpio_request(board->det_pin, "cf_det");
243 if (status < 0) 241 if (status < 0)
244 goto fail0; 242 goto fail0;
245 status = request_irq(gpio_to_irq(board->det_pin), at91_cf_irq, 0, driver_name, cf); 243 status = request_irq(gpio_to_irq(board->det_pin), at91_cf_irq, 0, "at91_cf detect", cf);
246 if (status < 0) 244 if (status < 0)
247 goto fail00; 245 goto fail00;
248 device_init_wakeup(&pdev->dev, 1); 246 device_init_wakeup(&pdev->dev, 1);
@@ -268,7 +266,7 @@ static int __init at91_cf_probe(struct platform_device *pdev)
268 if (status < 0) 266 if (status < 0)
269 goto fail0c; 267 goto fail0c;
270 status = request_irq(gpio_to_irq(board->irq_pin), at91_cf_irq, 268 status = request_irq(gpio_to_irq(board->irq_pin), at91_cf_irq,
271 IRQF_SHARED, driver_name, cf); 269 IRQF_SHARED, "at91_cf", cf);
272 if (status < 0) 270 if (status < 0)
273 goto fail0d; 271 goto fail0d;
274 cf->socket.pci_irq = gpio_to_irq(board->irq_pin); 272 cf->socket.pci_irq = gpio_to_irq(board->irq_pin);
@@ -284,12 +282,12 @@ static int __init at91_cf_probe(struct platform_device *pdev)
284 } 282 }
285 283
286 /* reserve chip-select regions */ 284 /* reserve chip-select regions */
287 if (!request_mem_region(io->start, resource_size(io), driver_name)) { 285 if (!request_mem_region(io->start, resource_size(io), "at91_cf")) {
288 status = -ENXIO; 286 status = -ENXIO;
289 goto fail1; 287 goto fail1;
290 } 288 }
291 289
292 pr_info("%s: irqs det #%d, io #%d\n", driver_name, 290 dev_info(&pdev->dev, "irqs det #%d, io #%d\n",
293 gpio_to_irq(board->det_pin), gpio_to_irq(board->irq_pin)); 291 gpio_to_irq(board->det_pin), gpio_to_irq(board->irq_pin));
294 292
295 cf->socket.owner = THIS_MODULE; 293 cf->socket.owner = THIS_MODULE;
@@ -391,7 +389,7 @@ static int at91_cf_resume(struct platform_device *pdev)
391 389
392static struct platform_driver at91_cf_driver = { 390static struct platform_driver at91_cf_driver = {
393 .driver = { 391 .driver = {
394 .name = (char *) driver_name, 392 .name = "at91_cf",
395 .owner = THIS_MODULE, 393 .owner = THIS_MODULE,
396 }, 394 },
397 .remove = __exit_p(at91_cf_remove), 395 .remove = __exit_p(at91_cf_remove),