Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: atmel_usba_udc: change way of specifying bias function

The toggle_bias() function was specified differently for avr32 and at91
architectures. Now, new at91 have the same behavior as avr32.
Consequently, we change to a particular chip function definition: only for
at91sam9rl.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Nicolas Ferre and committed by
Greg Kroah-Hartman
e60c65d3 23a54e56

+8 -8
+8 -8
drivers/usb/gadget/atmel_usba_udc.c
··· 326 326 return 1; 327 327 } 328 328 329 - #if defined(CONFIG_AVR32) 330 - 331 - static void toggle_bias(int is_on) 332 - { 333 - } 334 - 335 - #elif defined(CONFIG_ARCH_AT91) 329 + #if defined(CONFIG_ARCH_AT91SAM9RL) 336 330 337 331 #include <mach/at91_pmc.h> 338 332 ··· 340 346 at91_sys_write(AT91_CKGR_UCKR, uckr & ~(AT91_PMC_BIASEN)); 341 347 } 342 348 343 - #endif /* CONFIG_ARCH_AT91 */ 349 + #else 350 + 351 + static void toggle_bias(int is_on) 352 + { 353 + } 354 + 355 + #endif /* CONFIG_ARCH_AT91SAM9RL */ 344 356 345 357 static void next_fifo_transaction(struct usba_ep *ep, struct usba_request *req) 346 358 {