Loading arch/blackfin/kernel/bfin_gpio.c +39 −47 Original line number Diff line number Diff line Loading @@ -348,11 +348,10 @@ static void portmux_setup(unsigned short per, unsigned short function) offset = port_mux_lut[y].offset; muxreg = bfin_read_PORT_MUX(); if (offset != 1) { if (offset != 1) muxreg &= ~(1 << offset); } else { else muxreg &= ~(3 << 1); } muxreg |= (function << offset); bfin_write_PORT_MUX(muxreg); Loading Loading @@ -424,11 +423,9 @@ static void default_gpio(unsigned gpio) static int __init bfin_gpio_init(void) { printk(KERN_INFO "Blackfin GPIO Controller\n"); return 0; } arch_initcall(bfin_gpio_init); Loading Loading @@ -954,9 +951,9 @@ int peripheral_request_list(unsigned short per[], const char *label) ret = peripheral_request(per[cnt], label); if (ret < 0) { for ( ; cnt > 0; cnt--) { for ( ; cnt > 0; cnt--) peripheral_free(per[cnt - 1]); } return ret; } } Loading @@ -981,15 +978,13 @@ void peripheral_free(unsigned short per) local_irq_save(flags); if (unlikely(!(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident)))) { if (unlikely(!(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident)))) { local_irq_restore(flags); return; } if (!(per & P_MAYSHARE)) { if (!(per & P_MAYSHARE)) port_setup(ident, GPIO_USAGE); } reserved_peri_map[gpio_bank(ident)] &= ~gpio_bit(ident); Loading @@ -1002,12 +997,9 @@ EXPORT_SYMBOL(peripheral_free); void peripheral_free_list(unsigned short per[]) { u16 cnt; for (cnt = 0; per[cnt] != 0; cnt++) { for (cnt = 0; per[cnt] != 0; cnt++) peripheral_free(per[cnt]); } } EXPORT_SYMBOL(peripheral_free_list); /*********************************************************** Loading Loading
arch/blackfin/kernel/bfin_gpio.c +39 −47 Original line number Diff line number Diff line Loading @@ -348,11 +348,10 @@ static void portmux_setup(unsigned short per, unsigned short function) offset = port_mux_lut[y].offset; muxreg = bfin_read_PORT_MUX(); if (offset != 1) { if (offset != 1) muxreg &= ~(1 << offset); } else { else muxreg &= ~(3 << 1); } muxreg |= (function << offset); bfin_write_PORT_MUX(muxreg); Loading Loading @@ -424,11 +423,9 @@ static void default_gpio(unsigned gpio) static int __init bfin_gpio_init(void) { printk(KERN_INFO "Blackfin GPIO Controller\n"); return 0; } arch_initcall(bfin_gpio_init); Loading Loading @@ -954,9 +951,9 @@ int peripheral_request_list(unsigned short per[], const char *label) ret = peripheral_request(per[cnt], label); if (ret < 0) { for ( ; cnt > 0; cnt--) { for ( ; cnt > 0; cnt--) peripheral_free(per[cnt - 1]); } return ret; } } Loading @@ -981,15 +978,13 @@ void peripheral_free(unsigned short per) local_irq_save(flags); if (unlikely(!(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident)))) { if (unlikely(!(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident)))) { local_irq_restore(flags); return; } if (!(per & P_MAYSHARE)) { if (!(per & P_MAYSHARE)) port_setup(ident, GPIO_USAGE); } reserved_peri_map[gpio_bank(ident)] &= ~gpio_bit(ident); Loading @@ -1002,12 +997,9 @@ EXPORT_SYMBOL(peripheral_free); void peripheral_free_list(unsigned short per[]) { u16 cnt; for (cnt = 0; per[cnt] != 0; cnt++) { for (cnt = 0; per[cnt] != 0; cnt++) peripheral_free(per[cnt]); } } EXPORT_SYMBOL(peripheral_free_list); /*********************************************************** Loading