aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/card/sdio_uart.c13
-rw-r--r--drivers/mmc/core/core.c4
-rw-r--r--drivers/mmc/host/sdricoh_cs.c20
3 files changed, 5 insertions, 32 deletions
diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c
index c931dfe6a59c..f093cea0d060 100644
--- a/drivers/mmc/card/sdio_uart.c
+++ b/drivers/mmc/card/sdio_uart.c
@@ -134,7 +134,6 @@ static void sdio_uart_port_put(struct sdio_uart_port *port)
134static void sdio_uart_port_remove(struct sdio_uart_port *port) 134static void sdio_uart_port_remove(struct sdio_uart_port *port)
135{ 135{
136 struct sdio_func *func; 136 struct sdio_func *func;
137 struct tty_struct *tty;
138 137
139 BUG_ON(sdio_uart_table[port->index] != port); 138 BUG_ON(sdio_uart_table[port->index] != port);
140 139
@@ -155,12 +154,8 @@ static void sdio_uart_port_remove(struct sdio_uart_port *port)
155 sdio_claim_host(func); 154 sdio_claim_host(func);
156 port->func = NULL; 155 port->func = NULL;
157 mutex_unlock(&port->func_lock); 156 mutex_unlock(&port->func_lock);
158 tty = tty_port_tty_get(&port->port);
159 /* tty_hangup is async so is this safe as is ?? */ 157 /* tty_hangup is async so is this safe as is ?? */
160 if (tty) { 158 tty_port_tty_hangup(&port->port, false);
161 tty_hangup(tty);
162 tty_kref_put(tty);
163 }
164 mutex_unlock(&port->port.mutex); 159 mutex_unlock(&port->port.mutex);
165 sdio_release_irq(func); 160 sdio_release_irq(func);
166 sdio_disable_func(func); 161 sdio_disable_func(func);
@@ -492,11 +487,7 @@ static void sdio_uart_check_modem_status(struct sdio_uart_port *port)
492 wake_up_interruptible(&port->port.open_wait); 487 wake_up_interruptible(&port->port.open_wait);
493 else { 488 else {
494 /* DCD drop - hang up if tty attached */ 489 /* DCD drop - hang up if tty attached */
495 tty = tty_port_tty_get(&port->port); 490 tty_port_tty_hangup(&port->port, false);
496 if (tty) {
497 tty_hangup(tty);
498 tty_kref_put(tty);
499 }
500 } 491 }
501 } 492 }
502 if (status & UART_MSR_DCTS) { 493 if (status & UART_MSR_DCTS) {
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 08a3cf2a7610..9290bb51a06a 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -120,8 +120,8 @@ static void mmc_should_fail_request(struct mmc_host *host,
120 !should_fail(&host->fail_mmc_request, data->blksz * data->blocks)) 120 !should_fail(&host->fail_mmc_request, data->blksz * data->blocks))
121 return; 121 return;
122 122
123 data->error = data_errors[random32() % ARRAY_SIZE(data_errors)]; 123 data->error = data_errors[prandom_u32() % ARRAY_SIZE(data_errors)];
124 data->bytes_xfered = (random32() % (data->bytes_xfered >> 9)) << 9; 124 data->bytes_xfered = (prandom_u32() % (data->bytes_xfered >> 9)) << 9;
125} 125}
126 126
127#else /* CONFIG_FAIL_MMC_REQUEST */ 127#else /* CONFIG_FAIL_MMC_REQUEST */
diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdricoh_cs.c
index 7009f17ad6cd..50adbd155f35 100644
--- a/drivers/mmc/host/sdricoh_cs.c
+++ b/drivers/mmc/host/sdricoh_cs.c
@@ -543,25 +543,7 @@ static struct pcmcia_driver sdricoh_driver = {
543 .suspend = sdricoh_pcmcia_suspend, 543 .suspend = sdricoh_pcmcia_suspend,
544 .resume = sdricoh_pcmcia_resume, 544 .resume = sdricoh_pcmcia_resume,
545}; 545};
546 546module_pcmcia_driver(sdricoh_driver);
547/*****************************************************************************\
548 * *
549 * Driver init/exit *
550 * *
551\*****************************************************************************/
552
553static int __init sdricoh_drv_init(void)
554{
555 return pcmcia_register_driver(&sdricoh_driver);
556}
557
558static void __exit sdricoh_drv_exit(void)
559{
560 pcmcia_unregister_driver(&sdricoh_driver);
561}
562
563module_init(sdricoh_drv_init);
564module_exit(sdricoh_drv_exit);
565 547
566module_param(switchlocked, uint, 0444); 548module_param(switchlocked, uint, 0444);
567 549