diff options
-rw-r--r-- | drivers/rtc/rtc-s5m.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c index 64baad379174..8c70d785ba73 100644 --- a/drivers/rtc/rtc-s5m.c +++ b/drivers/rtc/rtc-s5m.c | |||
@@ -92,7 +92,7 @@ struct s5m_rtc_info { | |||
92 | struct regmap *regmap; | 92 | struct regmap *regmap; |
93 | struct rtc_device *rtc_dev; | 93 | struct rtc_device *rtc_dev; |
94 | int irq; | 94 | int irq; |
95 | int device_type; | 95 | enum sec_device_type device_type; |
96 | int rtc_24hr_mode; | 96 | int rtc_24hr_mode; |
97 | const struct s5m_rtc_reg_config *regs; | 97 | const struct s5m_rtc_reg_config *regs; |
98 | }; | 98 | }; |
@@ -668,7 +668,7 @@ static int s5m_rtc_probe(struct platform_device *pdev) | |||
668 | if (!info) | 668 | if (!info) |
669 | return -ENOMEM; | 669 | return -ENOMEM; |
670 | 670 | ||
671 | switch (pdata->device_type) { | 671 | switch (platform_get_device_id(pdev)->driver_data) { |
672 | case S2MPS14X: | 672 | case S2MPS14X: |
673 | case S2MPS13X: | 673 | case S2MPS13X: |
674 | regmap_cfg = &s2mps14_rtc_regmap_config; | 674 | regmap_cfg = &s2mps14_rtc_regmap_config; |
@@ -686,7 +686,9 @@ static int s5m_rtc_probe(struct platform_device *pdev) | |||
686 | alarm_irq = S5M8767_IRQ_RTCA1; | 686 | alarm_irq = S5M8767_IRQ_RTCA1; |
687 | break; | 687 | break; |
688 | default: | 688 | default: |
689 | dev_err(&pdev->dev, "Device type is not supported by RTC driver\n"); | 689 | dev_err(&pdev->dev, |
690 | "Device type %lu is not supported by RTC driver\n", | ||
691 | platform_get_device_id(pdev)->driver_data); | ||
690 | return -ENODEV; | 692 | return -ENODEV; |
691 | } | 693 | } |
692 | 694 | ||
@@ -706,7 +708,7 @@ static int s5m_rtc_probe(struct platform_device *pdev) | |||
706 | 708 | ||
707 | info->dev = &pdev->dev; | 709 | info->dev = &pdev->dev; |
708 | info->s5m87xx = s5m87xx; | 710 | info->s5m87xx = s5m87xx; |
709 | info->device_type = s5m87xx->device_type; | 711 | info->device_type = platform_get_device_id(pdev)->driver_data; |
710 | 712 | ||
711 | if (s5m87xx->irq_data) { | 713 | if (s5m87xx->irq_data) { |
712 | info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq); | 714 | info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq); |