aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-pcf50606.c
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2009-10-17 04:47:35 +0400
committerPaul Fertser <fercerpav@gmail.com>2009-10-17 04:52:57 +0400
commit350d5560bb262e73e1f1c05bf488fea6750a52d6 (patch)
tree46a2abf96452b8c7abcb206dba8176e60083e23e /drivers/rtc/rtc-pcf50606.c
parent3daf677d5e8e4d6a89845952e0a503c4bd57e456 (diff)
Fix memleak in pcf50633_client_dev_registe
Ported from 207ec43e8c5a54dfc82a0e65af5b8f2765e3cbb8
Diffstat (limited to 'drivers/rtc/rtc-pcf50606.c')
-rw-r--r--drivers/rtc/rtc-pcf50606.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-pcf50606.c b/drivers/rtc/rtc-pcf50606.c
index 6bd93b0b672..01ce1b9e48f 100644
--- a/drivers/rtc/rtc-pcf50606.c
+++ b/drivers/rtc/rtc-pcf50606.c
@@ -271,16 +271,13 @@ static void pcf50606_rtc_irq(int irq, void *data)
static int __devinit pcf50606_rtc_probe(struct platform_device *pdev)
{
- struct pcf50606_subdev_pdata *pdata;
struct pcf50606_rtc *rtc;
-
rtc = kzalloc(sizeof(*rtc), GFP_KERNEL);
if (!rtc)
return -ENOMEM;
- pdata = pdev->dev.platform_data;
- rtc->pcf = pdata->pcf;
+ rtc->pcf = dev_to_pcf50606(pdev->dev.parent);
platform_set_drvdata(pdev, rtc);
rtc->rtc_dev = rtc_device_register("pcf50606-rtc", &pdev->dev,
&pcf50606_rtc_ops, THIS_MODULE);