From 7c9df2ef815eaa70df86e0300f99c8b692627abd Mon Sep 17 00:00:00 2001 From: Sven Rebhan Date: Mon, 23 Feb 2009 01:21:52 +0000 Subject: Allow disabling of GTA02 vibrator If the vibrator is disabled we don't need to register a platform device. Signed-off-by: Sven Rebhan --- arch/arm/mach-s3c2442/mach-gta02.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c index 6f32ccfbf26..91e752db267 100644 --- a/arch/arm/mach-s3c2442/mach-gta02.c +++ b/arch/arm/mach-s3c2442/mach-gta02.c @@ -794,6 +794,8 @@ struct platform_device bq27000_battery_device = { }; #endif + +#ifdef CONFIG_LEDS_NEO1973_VIBRATOR /* vibrator (child of FIQ) */ static struct resource gta02_vibrator_resources[] = { @@ -816,6 +818,7 @@ static struct platform_device gta02_vibrator_dev = { .platform_data = >a02_vib_pdata, }, }; +#endif /* NOR Flash */ @@ -1699,13 +1702,14 @@ static void __init gta02_machine_init(void) pm_power_off = gta02_poweroff; /* Register the HDQ and vibrator as children of pwm device */ - gta02_vibrator_dev.dev.parent = &s3c24xx_pwm_device.dev; - platform_device_register(>a02_vibrator_dev); #ifdef CONFIG_HDQ_GPIO_BITBANG gta02_hdq_device.dev.parent = &s3c24xx_pwm_device.dev; platform_device_register(>a02_hdq_device); #endif - +#ifdef CONFIG_LEDS_NEO1973_VIBRATOR + gta02_vibrator_dev.dev.parent = &s3c24xx_pwm_device.dev; + platform_device_register(>a02_vibrator_dev); +#endif } void DEBUG_LED(int n) -- cgit v1.2.3