diff options
Diffstat (limited to 'drivers/memstick/host/tifm_ms.c')
-rw-r--r-- | drivers/memstick/host/tifm_ms.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/memstick/host/tifm_ms.c b/drivers/memstick/host/tifm_ms.c index 8577de4ebb0e..14458764588c 100644 --- a/drivers/memstick/host/tifm_ms.c +++ b/drivers/memstick/host/tifm_ms.c | |||
@@ -489,15 +489,12 @@ static void tifm_ms_request(struct memstick_host *msh) | |||
489 | return; | 489 | return; |
490 | } | 490 | } |
491 | 491 | ||
492 | static void tifm_ms_set_param(struct memstick_host *msh, | 492 | static int tifm_ms_set_param(struct memstick_host *msh, |
493 | enum memstick_param param, | 493 | enum memstick_param param, |
494 | int value) | 494 | int value) |
495 | { | 495 | { |
496 | struct tifm_ms *host = memstick_priv(msh); | 496 | struct tifm_ms *host = memstick_priv(msh); |
497 | struct tifm_dev *sock = host->dev; | 497 | struct tifm_dev *sock = host->dev; |
498 | unsigned long flags; | ||
499 | |||
500 | spin_lock_irqsave(&sock->lock, flags); | ||
501 | 498 | ||
502 | switch (param) { | 499 | switch (param) { |
503 | case MEMSTICK_POWER: | 500 | case MEMSTICK_POWER: |
@@ -512,7 +509,8 @@ static void tifm_ms_set_param(struct memstick_host *msh, | |||
512 | writel(TIFM_MS_SYS_FCLR | TIFM_MS_SYS_INTCLR, | 509 | writel(TIFM_MS_SYS_FCLR | TIFM_MS_SYS_INTCLR, |
513 | sock->addr + SOCK_MS_SYSTEM); | 510 | sock->addr + SOCK_MS_SYSTEM); |
514 | writel(0xffffffff, sock->addr + SOCK_MS_STATUS); | 511 | writel(0xffffffff, sock->addr + SOCK_MS_STATUS); |
515 | } | 512 | } else |
513 | return -EINVAL; | ||
516 | break; | 514 | break; |
517 | case MEMSTICK_INTERFACE: | 515 | case MEMSTICK_INTERFACE: |
518 | if (value == MEMSTICK_SERIAL) { | 516 | if (value == MEMSTICK_SERIAL) { |
@@ -525,11 +523,12 @@ static void tifm_ms_set_param(struct memstick_host *msh, | |||
525 | writel(TIFM_CTRL_FAST_CLK | 523 | writel(TIFM_CTRL_FAST_CLK |
526 | | readl(sock->addr + SOCK_CONTROL), | 524 | | readl(sock->addr + SOCK_CONTROL), |
527 | sock->addr + SOCK_CONTROL); | 525 | sock->addr + SOCK_CONTROL); |
528 | } | 526 | } else |
527 | return -EINVAL; | ||
529 | break; | 528 | break; |
530 | }; | 529 | }; |
531 | 530 | ||
532 | spin_unlock_irqrestore(&sock->lock, flags); | 531 | return 0; |
533 | } | 532 | } |
534 | 533 | ||
535 | static void tifm_ms_abort(unsigned long data) | 534 | static void tifm_ms_abort(unsigned long data) |