[PATCH v2 1/2] ARM: mxc: Introduce imx_add_gpio_leds

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Apr 5 03:59:32 EDT 2011


On Tue, Apr 05, 2011 at 09:51:18AM +0200, Uwe Kleine-König wrote:
> This was intended by
> 
> 	struct gpio_led_platform_data *_pdata = *pdata;
> 
> I'm just fighting with the compiler at this line because it doesn't like
> _pdata being initialized by a const pointer.

That's idiotic and revolting.  Casting away const means you're writing
broken code, which can fail for XIP users.  If you're going to play
such games, there's *NO* point in marking it const in the first place.



More information about the linux-arm-kernel mailing list