Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245351
b: refs/heads/master
c: 3c437ff
h: refs/heads/master
i:
  245349: 62d4c30
  245347: 125f605
  245343: d2583e1
v: v3
  • Loading branch information
Rafael J. Wysocki committed Apr 24, 2011
1 parent 545fdd8 commit 747f6a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 328f5cc30290a92ea3ca62b2a63d2b9ebcb0d334
refs/heads/master: 3c437ffd20329619672b12a97bee944bccdd4ec9
35 changes: 9 additions & 26 deletions trunk/arch/arm/plat-omap/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/sysdev.h>
#include <linux/syscore_ops.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/io.h>
Expand Down Expand Up @@ -1372,9 +1372,7 @@ static const struct dev_pm_ops omap_mpuio_dev_pm_ops = {
.resume_noirq = omap_mpuio_resume_noirq,
};

/* use platform_driver for this, now that there's no longer any
* point to sys_device (other than not disturbing old code).
*/
/* use platform_driver for this. */
static struct platform_driver omap_mpuio_driver = {
.driver = {
.name = "mpuio",
Expand Down Expand Up @@ -1745,7 +1743,7 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev)
}

#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS)
static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg)
static int omap_gpio_suspend(void)
{
int i;

Expand Down Expand Up @@ -1795,12 +1793,12 @@ static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg)
return 0;
}

static int omap_gpio_resume(struct sys_device *dev)
static void omap_gpio_resume(void)
{
int i;

if (!cpu_class_is_omap2() && !cpu_is_omap16xx())
return 0;
return;

for (i = 0; i < gpio_bank_count; i++) {
struct gpio_bank *bank = &gpio_bank[i];
Expand Down Expand Up @@ -1836,21 +1834,13 @@ static int omap_gpio_resume(struct sys_device *dev)
__raw_writel(bank->saved_wakeup, wake_set);
spin_unlock_irqrestore(&bank->lock, flags);
}

return 0;
}

static struct sysdev_class omap_gpio_sysclass = {
.name = "gpio",
static struct syscore_ops omap_gpio_syscore_ops = {
.suspend = omap_gpio_suspend,
.resume = omap_gpio_resume,
};

static struct sys_device omap_gpio_device = {
.id = 0,
.cls = &omap_gpio_sysclass,
};

#endif

#ifdef CONFIG_ARCH_OMAP2PLUS
Expand Down Expand Up @@ -2108,21 +2098,14 @@ postcore_initcall(omap_gpio_drv_reg);

static int __init omap_gpio_sysinit(void)
{
int ret = 0;

mpuio_init();

#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS)
if (cpu_is_omap16xx() || cpu_class_is_omap2()) {
if (ret == 0) {
ret = sysdev_class_register(&omap_gpio_sysclass);
if (ret == 0)
ret = sysdev_register(&omap_gpio_device);
}
}
if (cpu_is_omap16xx() || cpu_class_is_omap2())
register_syscore_ops(&omap_gpio_syscore_ops);
#endif

return ret;
return 0;
}

arch_initcall(omap_gpio_sysinit);

0 comments on commit 747f6a8

Please sign in to comment.