diff options
Diffstat (limited to 'drivers/mfd/mc13xxx-core.c')
-rw-r--r-- | drivers/mfd/mc13xxx-core.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c index b9fcaf0004da..668634e89e81 100644 --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c | |||
@@ -683,14 +683,13 @@ out: | |||
683 | EXPORT_SYMBOL_GPL(mc13783_adc_do_conversion); | 683 | EXPORT_SYMBOL_GPL(mc13783_adc_do_conversion); |
684 | 684 | ||
685 | static int mc13xxx_add_subdevice_pdata(struct mc13xxx *mc13xxx, | 685 | static int mc13xxx_add_subdevice_pdata(struct mc13xxx *mc13xxx, |
686 | const char *format, void *pdata, size_t pdata_size) | 686 | const char *format, void *pdata) |
687 | { | 687 | { |
688 | char buf[30]; | 688 | char buf[30]; |
689 | const char *name = mc13xxx_get_chipname(mc13xxx); | 689 | const char *name = mc13xxx_get_chipname(mc13xxx); |
690 | 690 | ||
691 | struct mfd_cell cell = { | 691 | struct mfd_cell cell = { |
692 | .platform_data = pdata, | 692 | .mfd_data = pdata, |
693 | .data_size = pdata_size, | ||
694 | }; | 693 | }; |
695 | 694 | ||
696 | /* there is no asnprintf in the kernel :-( */ | 695 | /* there is no asnprintf in the kernel :-( */ |
@@ -706,7 +705,7 @@ static int mc13xxx_add_subdevice_pdata(struct mc13xxx *mc13xxx, | |||
706 | 705 | ||
707 | static int mc13xxx_add_subdevice(struct mc13xxx *mc13xxx, const char *format) | 706 | static int mc13xxx_add_subdevice(struct mc13xxx *mc13xxx, const char *format) |
708 | { | 707 | { |
709 | return mc13xxx_add_subdevice_pdata(mc13xxx, format, NULL, 0); | 708 | return mc13xxx_add_subdevice_pdata(mc13xxx, format, NULL); |
710 | } | 709 | } |
711 | 710 | ||
712 | static int mc13xxx_probe(struct spi_device *spi) | 711 | static int mc13xxx_probe(struct spi_device *spi) |
@@ -764,13 +763,8 @@ err_revision: | |||
764 | mc13xxx_add_subdevice(mc13xxx, "%s-codec"); | 763 | mc13xxx_add_subdevice(mc13xxx, "%s-codec"); |
765 | 764 | ||
766 | if (pdata->flags & MC13XXX_USE_REGULATOR) { | 765 | if (pdata->flags & MC13XXX_USE_REGULATOR) { |
767 | struct mc13xxx_regulator_platform_data regulator_pdata = { | ||
768 | .num_regulators = pdata->num_regulators, | ||
769 | .regulators = pdata->regulators, | ||
770 | }; | ||
771 | |||
772 | mc13xxx_add_subdevice_pdata(mc13xxx, "%s-regulator", | 766 | mc13xxx_add_subdevice_pdata(mc13xxx, "%s-regulator", |
773 | ®ulator_pdata, sizeof(regulator_pdata)); | 767 | &pdata->regulators); |
774 | } | 768 | } |
775 | 769 | ||
776 | if (pdata->flags & MC13XXX_USE_RTC) | 770 | if (pdata->flags & MC13XXX_USE_RTC) |
@@ -779,10 +773,8 @@ err_revision: | |||
779 | if (pdata->flags & MC13XXX_USE_TOUCHSCREEN) | 773 | if (pdata->flags & MC13XXX_USE_TOUCHSCREEN) |
780 | mc13xxx_add_subdevice(mc13xxx, "%s-ts"); | 774 | mc13xxx_add_subdevice(mc13xxx, "%s-ts"); |
781 | 775 | ||
782 | if (pdata->flags & MC13XXX_USE_LED) { | 776 | if (pdata->flags & MC13XXX_USE_LED) |
783 | mc13xxx_add_subdevice_pdata(mc13xxx, "%s-led", | 777 | mc13xxx_add_subdevice_pdata(mc13xxx, "%s-led", pdata->leds); |
784 | pdata->leds, sizeof(*pdata->leds)); | ||
785 | } | ||
786 | 778 | ||
787 | return 0; | 779 | return 0; |
788 | } | 780 | } |
@@ -811,6 +803,7 @@ static const struct spi_device_id mc13xxx_device_id[] = { | |||
811 | /* sentinel */ | 803 | /* sentinel */ |
812 | } | 804 | } |
813 | }; | 805 | }; |
806 | MODULE_DEVICE_TABLE(spi, mc13xxx_device_id); | ||
814 | 807 | ||
815 | static struct spi_driver mc13xxx_driver = { | 808 | static struct spi_driver mc13xxx_driver = { |
816 | .id_table = mc13xxx_device_id, | 809 | .id_table = mc13xxx_device_id, |