diff options
author | Koen Kooi <koen@openembedded.org> | 2009-01-30 13:25:14 +0100 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2009-01-30 13:25:14 +0100 |
commit | c74e1d46b68f67f059050263ebb434a3d7344657 (patch) | |
tree | 0e913a2f32296da798ba6cd4a9f3dcea26da43c4 /packages/kexecboot/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch | |
parent | 2466a29b608e4725de8e71e4c38618b0b9bfe088 (diff) | |
parent | c49f410e88a5828c198ebbe3f781bc9e5ab1a347 (diff) |
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'packages/kexecboot/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch')
-rw-r--r-- | packages/kexecboot/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/packages/kexecboot/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch b/packages/kexecboot/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch new file mode 100644 index 0000000000..c4b57cb2d1 --- /dev/null +++ b/packages/kexecboot/linux-kexecboot-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch @@ -0,0 +1,66 @@ +From edaab7ec86235871d8ad219a1d225ce12f67f8af Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov <dbaryshkov@gmail.com> +Date: Wed, 9 Jan 2008 02:13:29 +0300 +Subject: [PATCH 46/64] patch tc6393xb-cleanup + +--- + drivers/mfd/tc6393xb.c | 20 ++++++++++++-------- + 1 files changed, 12 insertions(+), 8 deletions(-) + +diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c +index 5d17687..dfae61d 100644 +--- a/drivers/mfd/tc6393xb.c ++++ b/drivers/mfd/tc6393xb.c +@@ -590,16 +590,8 @@ static int tc6393xb_hw_init(struct platform_device *dev, int resume) + struct tc6393xb_platform_data *tcpd = dev->dev.platform_data; + struct tc6393xb *tc6393xb = platform_get_drvdata(dev); + struct tc6393xb_scr __iomem *scr = tc6393xb->scr; +- int ret; + int i; + +- if (resume) +- ret = tcpd->resume(dev); +- else +- ret = tcpd->enable(dev); +- if (ret) +- return ret; +- + iowrite8(resume ? + tc6393xb->suspend_state.fer.raw : + 0, &scr->fer); +@@ -664,6 +656,10 @@ static int __devinit tc6393xb_probe(struct platform_device *dev) + goto err_ioremap; + } + ++ retval = tcpd->enable(dev); ++ if (retval) ++ goto err_enable; ++ + retval = tc6393xb_hw_init(dev, 0); + if (retval) + goto err_hw_init; +@@ -690,6 +686,8 @@ static int __devinit tc6393xb_probe(struct platform_device *dev) + tc6393xb_detach_irq(dev); + + err_hw_init: ++ tcpd->disable(dev); ++err_enable: + iounmap(tc6393xb->scr); + err_ioremap: + release_resource(rscr); +@@ -743,6 +741,12 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state) + + static int tc6393xb_resume(struct platform_device *dev) + { ++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data; ++ int ret = tcpd->resume(dev); ++ ++ if (ret) ++ return ret; ++ + return tc6393xb_hw_init(dev, 1); + } + #else +-- +1.5.3.8 + |