[PATCH 1/2] PalmTreo: generalisation of Treo680 code

Tomáš 'Sleep_Walker' Čech sleep_walker at suse.cz
Sun Sep 13 05:03:37 EDT 2009


Hi,

thanks for reading my patch!

Dne So 12. září 2009 21:29:06 Marek Vasut napsal(a):
> ...
> > -static struct gpio_led_platform_data gpio_led_info = {
> > -	.leds		= gpio_leds,
> > -	.num_leds	= ARRAY_SIZE(gpio_leds),
> > +static struct gpio_led_platform_data treo680_gpio_led_info = {
> > +	.leds		= treo680_gpio_leds,
> > +	.num_leds	= ARRAY_SIZE(treo680_gpio_leds),
> >  };
> 
> Be careful so you dont run into symbol redefinition here (gpio_led_info) in case 
> the kernel supports more than this one device ...

That's why I change the name. It's called now 'treo680_gpio_led_info' as you can see.

> ...
> > +#endif /* CONFIG_MACH_TREO680 */
> > +
> >  /* setup udc GPIOs initial state */
> > -static void __init treo680_udc_init(void)
> > +static void __init treo_udc_init(void)
> >  {
> > -	if (!gpio_request(GPIO_NR_TREO680_USB_PULLUP, "UDC Vbus")) {
> > -		gpio_direction_output(GPIO_NR_TREO680_USB_PULLUP, 1);
> > -		gpio_free(GPIO_NR_TREO680_USB_PULLUP);
> > +	if (!gpio_request(GPIO_NR_TREO_USB_PULLUP, "UDC Vbus")) {
> > +		gpio_direction_output(GPIO_NR_TREO_USB_PULLUP, 1);
> > +		gpio_free(GPIO_NR_TREO_USB_PULLUP);
> >  	}
> >  }
> >
> 
> Is this really needed or is it just a copy-paste from other Palm device?
Unfortunately yes. There is no copy-paste in this code which wasn't checked and tested. It doesn't work correctly without that.

Best regards,

Tomas Cech



More information about the linux-arm-kernel mailing list