|
@@ -673,21 +673,9 @@ int mc13xxx_common_init(struct device *dev)
|
|
if (mc13xxx->flags & MC13XXX_USE_ADC)
|
|
if (mc13xxx->flags & MC13XXX_USE_ADC)
|
|
mc13xxx_add_subdevice(mc13xxx, "%s-adc");
|
|
mc13xxx_add_subdevice(mc13xxx, "%s-adc");
|
|
|
|
|
|
- if (mc13xxx->flags & MC13XXX_USE_CODEC) {
|
|
|
|
- if (pdata)
|
|
|
|
- mc13xxx_add_subdevice_pdata(mc13xxx, "%s-codec",
|
|
|
|
- pdata->codec, sizeof(*pdata->codec));
|
|
|
|
- else
|
|
|
|
- mc13xxx_add_subdevice(mc13xxx, "%s-codec");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (mc13xxx->flags & MC13XXX_USE_RTC)
|
|
if (mc13xxx->flags & MC13XXX_USE_RTC)
|
|
mc13xxx_add_subdevice(mc13xxx, "%s-rtc");
|
|
mc13xxx_add_subdevice(mc13xxx, "%s-rtc");
|
|
|
|
|
|
- if (mc13xxx->flags & MC13XXX_USE_TOUCHSCREEN)
|
|
|
|
- mc13xxx_add_subdevice_pdata(mc13xxx, "%s-ts",
|
|
|
|
- &pdata->touch, sizeof(pdata->touch));
|
|
|
|
-
|
|
|
|
if (pdata) {
|
|
if (pdata) {
|
|
mc13xxx_add_subdevice_pdata(mc13xxx, "%s-regulator",
|
|
mc13xxx_add_subdevice_pdata(mc13xxx, "%s-regulator",
|
|
&pdata->regulators, sizeof(pdata->regulators));
|
|
&pdata->regulators, sizeof(pdata->regulators));
|
|
@@ -695,10 +683,20 @@ int mc13xxx_common_init(struct device *dev)
|
|
pdata->leds, sizeof(*pdata->leds));
|
|
pdata->leds, sizeof(*pdata->leds));
|
|
mc13xxx_add_subdevice_pdata(mc13xxx, "%s-pwrbutton",
|
|
mc13xxx_add_subdevice_pdata(mc13xxx, "%s-pwrbutton",
|
|
pdata->buttons, sizeof(*pdata->buttons));
|
|
pdata->buttons, sizeof(*pdata->buttons));
|
|
|
|
+ if (mc13xxx->flags & MC13XXX_USE_CODEC)
|
|
|
|
+ mc13xxx_add_subdevice_pdata(mc13xxx, "%s-codec",
|
|
|
|
+ pdata->codec, sizeof(*pdata->codec));
|
|
|
|
+ if (mc13xxx->flags & MC13XXX_USE_TOUCHSCREEN)
|
|
|
|
+ mc13xxx_add_subdevice_pdata(mc13xxx, "%s-ts",
|
|
|
|
+ &pdata->touch, sizeof(pdata->touch));
|
|
} else {
|
|
} else {
|
|
mc13xxx_add_subdevice(mc13xxx, "%s-regulator");
|
|
mc13xxx_add_subdevice(mc13xxx, "%s-regulator");
|
|
mc13xxx_add_subdevice(mc13xxx, "%s-led");
|
|
mc13xxx_add_subdevice(mc13xxx, "%s-led");
|
|
mc13xxx_add_subdevice(mc13xxx, "%s-pwrbutton");
|
|
mc13xxx_add_subdevice(mc13xxx, "%s-pwrbutton");
|
|
|
|
+ if (mc13xxx->flags & MC13XXX_USE_CODEC)
|
|
|
|
+ mc13xxx_add_subdevice(mc13xxx, "%s-codec");
|
|
|
|
+ if (mc13xxx->flags & MC13XXX_USE_TOUCHSCREEN)
|
|
|
|
+ mc13xxx_add_subdevice(mc13xxx, "%s-ts");
|
|
}
|
|
}
|
|
|
|
|
|
return 0;
|
|
return 0;
|