diff options
| -rw-r--r-- | arch/sh/kernel/cpu/clock.c | 4 | ||||
| -rw-r--r-- | arch/sh/kernel/dwarf.c | 8 | ||||
| -rw-r--r-- | drivers/spi/spi_sh_msiof.c | 15 | ||||
| -rw-r--r-- | drivers/usb/host/r8a66597-hcd.c | 17 |
4 files changed, 28 insertions, 16 deletions
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index f3a46be2ae81..83da5debeedf 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c | |||
| @@ -598,7 +598,7 @@ static struct dentry *clk_debugfs_root; | |||
| 598 | static int clk_debugfs_register_one(struct clk *c) | 598 | static int clk_debugfs_register_one(struct clk *c) |
| 599 | { | 599 | { |
| 600 | int err; | 600 | int err; |
| 601 | struct dentry *d, *child; | 601 | struct dentry *d, *child, *child_tmp; |
| 602 | struct clk *pa = c->parent; | 602 | struct clk *pa = c->parent; |
| 603 | char s[255]; | 603 | char s[255]; |
| 604 | char *p = s; | 604 | char *p = s; |
| @@ -630,7 +630,7 @@ static int clk_debugfs_register_one(struct clk *c) | |||
| 630 | 630 | ||
| 631 | err_out: | 631 | err_out: |
| 632 | d = c->dentry; | 632 | d = c->dentry; |
| 633 | list_for_each_entry(child, &d->d_subdirs, d_u.d_child) | 633 | list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child) |
| 634 | debugfs_remove(child); | 634 | debugfs_remove(child); |
| 635 | debugfs_remove(c->dentry); | 635 | debugfs_remove(c->dentry); |
| 636 | return err; | 636 | return err; |
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index 3576b709f052..88d28ec3780a 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c | |||
| @@ -892,18 +892,18 @@ static struct unwinder dwarf_unwinder = { | |||
| 892 | 892 | ||
| 893 | static void dwarf_unwinder_cleanup(void) | 893 | static void dwarf_unwinder_cleanup(void) |
| 894 | { | 894 | { |
| 895 | struct dwarf_cie *cie; | 895 | struct dwarf_cie *cie, *cie_tmp; |
| 896 | struct dwarf_fde *fde; | 896 | struct dwarf_fde *fde, *fde_tmp; |
| 897 | 897 | ||
| 898 | /* | 898 | /* |
| 899 | * Deallocate all the memory allocated for the DWARF unwinder. | 899 | * Deallocate all the memory allocated for the DWARF unwinder. |
| 900 | * Traverse all the FDE/CIE lists and remove and free all the | 900 | * Traverse all the FDE/CIE lists and remove and free all the |
| 901 | * memory associated with those data structures. | 901 | * memory associated with those data structures. |
| 902 | */ | 902 | */ |
| 903 | list_for_each_entry(cie, &dwarf_cie_list, link) | 903 | list_for_each_entry_safe(cie, cie_tmp, &dwarf_cie_list, link) |
| 904 | kfree(cie); | 904 | kfree(cie); |
| 905 | 905 | ||
| 906 | list_for_each_entry(fde, &dwarf_fde_list, link) | 906 | list_for_each_entry_safe(fde, fde_tmp, &dwarf_fde_list, link) |
| 907 | kfree(fde); | 907 | kfree(fde); |
| 908 | 908 | ||
| 909 | kmem_cache_destroy(dwarf_reg_cachep); | 909 | kmem_cache_destroy(dwarf_reg_cachep); |
diff --git a/drivers/spi/spi_sh_msiof.c b/drivers/spi/spi_sh_msiof.c index 51e5e1dfa6e5..30973ec16a93 100644 --- a/drivers/spi/spi_sh_msiof.c +++ b/drivers/spi/spi_sh_msiof.c | |||
| @@ -173,15 +173,12 @@ static void sh_msiof_spi_set_pin_regs(struct sh_msiof_spi_priv *p, | |||
| 173 | int edge; | 173 | int edge; |
| 174 | 174 | ||
| 175 | /* | 175 | /* |
| 176 | * CPOL CPHA TSCKIZ RSCKIZ TEDG REDG(!) | 176 | * CPOL CPHA TSCKIZ RSCKIZ TEDG REDG |
| 177 | * 0 0 10 10 1 0 | 177 | * 0 0 10 10 1 1 |
| 178 | * 0 1 10 10 0 1 | 178 | * 0 1 10 10 0 0 |
| 179 | * 1 0 11 11 0 1 | 179 | * 1 0 11 11 0 0 |
| 180 | * 1 1 11 11 1 0 | 180 | * 1 1 11 11 1 1 |
| 181 | * | ||
| 182 | * (!) Note: REDG is inverted recommended data sheet setting | ||
| 183 | */ | 181 | */ |
| 184 | |||
| 185 | sh_msiof_write(p, FCTR, 0); | 182 | sh_msiof_write(p, FCTR, 0); |
| 186 | sh_msiof_write(p, TMDR1, 0xe2000005 | (lsb_first << 24)); | 183 | sh_msiof_write(p, TMDR1, 0xe2000005 | (lsb_first << 24)); |
| 187 | sh_msiof_write(p, RMDR1, 0x22000005 | (lsb_first << 24)); | 184 | sh_msiof_write(p, RMDR1, 0x22000005 | (lsb_first << 24)); |
| @@ -193,7 +190,7 @@ static void sh_msiof_spi_set_pin_regs(struct sh_msiof_spi_priv *p, | |||
| 193 | edge = cpol ? cpha : !cpha; | 190 | edge = cpol ? cpha : !cpha; |
| 194 | 191 | ||
| 195 | tmp |= edge << 27; /* TEDG */ | 192 | tmp |= edge << 27; /* TEDG */ |
| 196 | tmp |= !edge << 26; /* REDG */ | 193 | tmp |= edge << 26; /* REDG */ |
| 197 | tmp |= (tx_hi_z ? 2 : 0) << 22; /* TXDIZ */ | 194 | tmp |= (tx_hi_z ? 2 : 0) << 22; /* TXDIZ */ |
| 198 | sh_msiof_write(p, CTR, tmp); | 195 | sh_msiof_write(p, CTR, tmp); |
| 199 | } | 196 | } |
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index b7a661c02bcd..0ceec123ddfd 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c | |||
| @@ -216,8 +216,17 @@ static void disable_controller(struct r8a66597 *r8a66597) | |||
| 216 | { | 216 | { |
| 217 | int port; | 217 | int port; |
| 218 | 218 | ||
| 219 | /* disable interrupts */ | ||
| 219 | r8a66597_write(r8a66597, 0, INTENB0); | 220 | r8a66597_write(r8a66597, 0, INTENB0); |
| 220 | r8a66597_write(r8a66597, 0, INTSTS0); | 221 | r8a66597_write(r8a66597, 0, INTENB1); |
| 222 | r8a66597_write(r8a66597, 0, BRDYENB); | ||
| 223 | r8a66597_write(r8a66597, 0, BEMPENB); | ||
| 224 | r8a66597_write(r8a66597, 0, NRDYENB); | ||
| 225 | |||
| 226 | /* clear status */ | ||
| 227 | r8a66597_write(r8a66597, 0, BRDYSTS); | ||
| 228 | r8a66597_write(r8a66597, 0, NRDYSTS); | ||
| 229 | r8a66597_write(r8a66597, 0, BEMPSTS); | ||
| 221 | 230 | ||
| 222 | for (port = 0; port < r8a66597->max_root_hub; port++) | 231 | for (port = 0; port < r8a66597->max_root_hub; port++) |
| 223 | r8a66597_disable_port(r8a66597, port); | 232 | r8a66597_disable_port(r8a66597, port); |
| @@ -2466,6 +2475,12 @@ static int __devinit r8a66597_probe(struct platform_device *pdev) | |||
| 2466 | r8a66597->rh_timer.data = (unsigned long)r8a66597; | 2475 | r8a66597->rh_timer.data = (unsigned long)r8a66597; |
| 2467 | r8a66597->reg = (unsigned long)reg; | 2476 | r8a66597->reg = (unsigned long)reg; |
| 2468 | 2477 | ||
| 2478 | /* make sure no interrupts are pending */ | ||
| 2479 | ret = r8a66597_clock_enable(r8a66597); | ||
| 2480 | if (ret < 0) | ||
| 2481 | goto clean_up3; | ||
| 2482 | disable_controller(r8a66597); | ||
| 2483 | |||
| 2469 | for (i = 0; i < R8A66597_MAX_NUM_PIPE; i++) { | 2484 | for (i = 0; i < R8A66597_MAX_NUM_PIPE; i++) { |
| 2470 | INIT_LIST_HEAD(&r8a66597->pipe_queue[i]); | 2485 | INIT_LIST_HEAD(&r8a66597->pipe_queue[i]); |
| 2471 | init_timer(&r8a66597->td_timer[i]); | 2486 | init_timer(&r8a66597->td_timer[i]); |
