rtc: fix crash in rtc driver during suspend
Mallikarjun Kasoju [Sat, 15 Sep 2012 12:37:25 +0000 (17:37 +0530)]
palmas rtc pointer is not assigned as child to palmas
which is causing kernel panic during suspend.

Reviewed-on: http://git-master/r/133000
(cherry picked from commit 94d02a6e4ffb1b7b616caa9e54310714ac6ec127)

Change-Id: I648913ff89d1b478f11638a9a3c7982491869683
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/143049
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

Rebase-Id: R2cf02ed02381d3a020fcd388ef5a35aeb0b989bc

drivers/rtc/rtc-palmas.c

index d5c963e..52952d4 100644 (file)
@@ -295,6 +295,7 @@ static int __devinit palmas_rtc_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
+       palmas->rtc = palmas_rtc;
        /* Clear pending interrupts */
        ret = palmas_rtc_read(palmas, PALMAS_RTC_STATUS_REG,
                &rtc_reg);