2005-03-29 19:18:03

by Pavel Machek

[permalink] [raw]
Subject: Fix u32 vs. pm_message_t in arm

Hi!

This fixes u32 vs. pm_message_t confusion in arm. I was not able to
even compile it, but it should not cause any problems. Please apply,

Pavel

--- clean/arch/arm/common/sa1111.c 2005-02-28 00:50:39.000000000 +0100
+++ linux/arch/arm/common/sa1111.c 2005-03-27 23:33:55.000000000 +0200
@@ -800,7 +800,7 @@

#ifdef CONFIG_PM

-static int sa1111_suspend(struct device *dev, u32 state, u32 level)
+static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level)
{
struct sa1111 *sachip = dev_get_drvdata(dev);
struct sa1111_save_data *save;
--- clean/arch/arm/kernel/time.c 2005-01-22 21:24:50.000000000 +0100
+++ linux/arch/arm/kernel/time.c 2005-03-27 23:33:55.000000000 +0200
@@ -178,7 +178,7 @@

static SYSDEV_ATTR(event, 0200, NULL, leds_store);

-static int leds_suspend(struct sys_device *dev, u32 state)
+static int leds_suspend(struct sys_device *dev, pm_message_t state)
{
leds_event(led_stop);
return 0;
@@ -351,7 +351,7 @@
}

#ifdef CONFIG_PM
-static int timer_suspend(struct sys_device *dev, u32 state)
+static int timer_suspend(struct sys_device *dev, pm_message_t state)
{
struct sys_timer *timer = container_of(dev, struct sys_timer, dev);

--- clean/arch/arm/mach-integrator/integrator_ap.c 2005-01-12 11:07:37.000000000 +0100
+++ linux/arch/arm/mach-integrator/integrator_ap.c 2005-03-27 23:33:55.000000000 +0200
@@ -137,7 +137,7 @@
#ifdef CONFIG_PM
static unsigned long ic_irq_enable;

-static int irq_suspend(struct sys_device *dev, u32 state)
+static int irq_suspend(struct sys_device *dev, pm_message_t state)
{
ic_irq_enable = readl(VA_IC_BASE + IRQ_ENABLE);
return 0;
--- clean/arch/arm/mach-integrator/time.c 2005-02-28 00:50:39.000000000 +0100
+++ linux/arch/arm/mach-integrator/time.c 2005-03-27 23:33:55.000000000 +0200
@@ -158,7 +158,7 @@

static struct timespec rtc_delta;

-static int rtc_suspend(struct amba_device *dev, u32 state)
+static int rtc_suspend(struct amba_device *dev, pm_message_t state)
{
struct timespec rtc;

--- clean/arch/arm/mach-pxa/corgi_ssp.c 2005-01-22 21:24:51.000000000 +0100
+++ linux/arch/arm/mach-pxa/corgi_ssp.c 2005-03-27 23:33:55.000000000 +0200
@@ -210,7 +210,7 @@
return 0;
}

-static int corgi_ssp_suspend(struct device *dev, u32 state, u32 level)
+static int corgi_ssp_suspend(struct device *dev, pm_message_t state, u32 level)
{
if (level == SUSPEND_POWER_DOWN) {
ssp_flush(&corgi_ssp_dev);
--- clean/arch/arm/mach-s3c2410/dma.c 2005-03-19 00:31:04.000000000 +0100
+++ linux/arch/arm/mach-s3c2410/dma.c 2005-03-27 23:33:55.000000000 +0200
@@ -1092,7 +1092,7 @@

#ifdef CONFIG_PM

-static int s3c2410_dma_suspend(struct sys_device *dev, u32 state)
+static int s3c2410_dma_suspend(struct sys_device *dev, pm_message_t state)
{
s3c2410_dma_chan_t *cp = container_of(dev, s3c2410_dma_chan_t, dev);

--- clean/arch/arm/mach-s3c2410/s3c2440.c 2005-03-19 00:31:04.000000000 +0100
+++ linux/arch/arm/mach-s3c2410/s3c2440.c 2005-03-27 23:33:55.000000000 +0200
@@ -159,7 +159,7 @@
SAVE_ITEM(S3C2440_GPJUP)
};

-static int s3c2440_suspend(struct sys_device *dev, u32 state)
+static int s3c2440_suspend(struct sys_device *dev, pm_message_t state)
{
s3c2410_pm_do_save(s3c2440_sleep, ARRAY_SIZE(s3c2440_sleep));
return 0;
--- clean/arch/arm/mach-sa1100/irq.c 2004-03-11 18:10:36.000000000 +0100
+++ linux/arch/arm/mach-sa1100/irq.c 2005-03-27 23:33:55.000000000 +0200
@@ -218,7 +218,7 @@
unsigned int iccr;
} sa1100irq_state;

-static int sa1100irq_suspend(struct sys_device *dev, u32 state)
+static int sa1100irq_suspend(struct sys_device *dev, pm_message_t state)
{
struct sa1100irq_state *st = &sa1100irq_state;

--- clean/arch/arm/mach-sa1100/neponset.c 2005-03-19 00:31:04.000000000 +0100
+++ linux/arch/arm/mach-sa1100/neponset.c 2005-03-27 23:33:55.000000000 +0200
@@ -178,7 +178,7 @@
/*
* LDM power management.
*/
-static int neponset_suspend(struct device *dev, u32 state, u32 level)
+static int neponset_suspend(struct device *dev, pm_message_t state, u32 level)
{
/*
* Save state.
--- clean/arch/arm/oprofile/common.c 2005-02-14 14:12:15.000000000 +0100
+++ linux/arch/arm/oprofile/common.c 2005-03-27 23:33:55.000000000 +0200
@@ -26,7 +26,7 @@
static int pmu_create_files(struct super_block *, struct dentry *);

#ifdef CONFIG_PM
-static int pmu_suspend(struct sys_device *dev, u32 state)
+static int pmu_suspend(struct sys_device *dev, pm_message_t state)
{
if (pmu_enabled)
pmu_stop();
--- clean/include/asm-arm/arch-integrator/lm.h 2003-09-28 22:06:34.000000000 +0200
+++ linux/include/asm-arm/arch-integrator/lm.h 2005-03-27 23:34:31.000000000 +0200
@@ -10,7 +10,7 @@
struct device_driver drv;
int (*probe)(struct lm_device *);
void (*remove)(struct lm_device *);
- int (*suspend)(struct lm_device *, u32);
+ int (*suspend)(struct lm_device *, pm_message_t);
int (*resume)(struct lm_device *);
};

--- clean/include/asm-arm/hardware/amba.h 2004-04-05 10:45:28.000000000 +0200
+++ linux/include/asm-arm/hardware/amba.h 2005-03-27 23:34:31.000000000 +0200
@@ -31,7 +31,7 @@
int (*probe)(struct amba_device *, void *);
int (*remove)(struct amba_device *);
void (*shutdown)(struct amba_device *);
- int (*suspend)(struct amba_device *, u32);
+ int (*suspend)(struct amba_device *, pm_message_t);
int (*resume)(struct amba_device *);
struct amba_id *id_table;
};
--- clean/include/asm-arm/hardware/locomo.h 2005-03-19 00:32:11.000000000 +0100
+++ linux/include/asm-arm/hardware/locomo.h 2005-03-27 23:34:31.000000000 +0200
@@ -181,7 +181,7 @@
unsigned int devid;
int (*probe)(struct locomo_dev *);
int (*remove)(struct locomo_dev *);
- int (*suspend)(struct locomo_dev *, u32);
+ int (*suspend)(struct locomo_dev *, pm_message_t);
int (*resume)(struct locomo_dev *);
};

--- clean/include/asm-arm/hardware/sa1111.h 2005-02-28 00:50:44.000000000 +0100
+++ linux/include/asm-arm/hardware/sa1111.h 2005-03-27 23:34:31.000000000 +0200
@@ -567,7 +567,7 @@
unsigned int devid;
int (*probe)(struct sa1111_dev *);
int (*remove)(struct sa1111_dev *);
- int (*suspend)(struct sa1111_dev *, u32);
+ int (*suspend)(struct sa1111_dev *, pm_message_t);
int (*resume)(struct sa1111_dev *);
};


--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!


2005-04-03 09:16:23

by Russell King

[permalink] [raw]
Subject: Re: Fix u32 vs. pm_message_t in arm

On Tue, Mar 29, 2005 at 09:15:43PM +0200, Pavel Machek wrote:
> This fixes u32 vs. pm_message_t confusion in arm. I was not able to
> even compile it, but it should not cause any problems. Please apply,

Applied, thanks.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core

2005-04-03 10:38:11

by Russell King

[permalink] [raw]
Subject: Re: Fix u32 vs. pm_message_t in arm

On Tue, Mar 29, 2005 at 09:15:43PM +0200, Pavel Machek wrote:
> This fixes u32 vs. pm_message_t confusion in arm. I was not able to
> even compile it, but it should not cause any problems. Please apply,

On testing this patch, it doesn't build. You need to include
linux/pm.h into linux/sysdev.h for starters, and fix sysdev.h
to also use pm_message_t in it's function pointers.

Therefore, I'd like the following patch either to be in mainline first,
or in my ARM tree for Linus to pull so ARM doesn't completely break
on my next merge.

===== include/linux/sysdev.h 1.7 vs edited =====
--- 1.7/include/linux/sysdev.h 2004-02-13 06:18:02 +00:00
+++ edited/include/linux/sysdev.h 2005-04-03 11:30:13 +01:00
@@ -22,6 +22,7 @@
#define _SYSDEV_H_

#include <linux/kobject.h>
+#include <linux/pm.h>


struct sys_device;


--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core

2005-04-03 10:44:32

by Pavel Machek

[permalink] [raw]
Subject: Re: Fix u32 vs. pm_message_t in arm

Hi!

> > This fixes u32 vs. pm_message_t confusion in arm. I was not able to
> > even compile it, but it should not cause any problems. Please apply,
>
> On testing this patch, it doesn't build. You need to include
> linux/pm.h into linux/sysdev.h for starters, and fix sysdev.h
> to also use pm_message_t in it's function pointers.
>
> Therefore, I'd like the following patch either to be in mainline first,
> or in my ARM tree for Linus to pull so ARM doesn't completely break
> on my next merge.

That patch was recently merged into -mm, so I hope its okay... Thanks
for testing. (And sorry, I did not realize patches depend on each
other this way).

Pavel

--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

2005-04-04 16:49:36

by Russell King

[permalink] [raw]
Subject: Re: Fix u32 vs. pm_message_t in arm

On Sun, Apr 03, 2005 at 12:44:14PM +0200, Pavel Machek wrote:
> > > This fixes u32 vs. pm_message_t confusion in arm. I was not able to
> > > even compile it, but it should not cause any problems. Please apply,
> >
> > On testing this patch, it doesn't build. You need to include
> > linux/pm.h into linux/sysdev.h for starters, and fix sysdev.h
> > to also use pm_message_t in it's function pointers.
> >
> > Therefore, I'd like the following patch either to be in mainline first,
> > or in my ARM tree for Linus to pull so ARM doesn't completely break
> > on my next merge.
>
> That patch was recently merged into -mm, so I hope its okay... Thanks
> for testing. (And sorry, I did not realize patches depend on each
> other this way).

Grumble. So it hasn't been merged before the ARM changes, which means
mainline is now broken for ARM. I knew I should've just thrown it
straight in along with the stuff depending on it. ;(

Linus - is the pm.h included in sysdev.h in -rc2?

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core

2005-04-04 17:02:26

by Linus Torvalds

[permalink] [raw]
Subject: Re: Fix u32 vs. pm_message_t in arm



On Mon, 4 Apr 2005, Russell King wrote:
>
> Linus - is the pm.h included in sysdev.h in -rc2?

Nope. Just includes kobject.h

Linus

2005-04-04 17:05:52

by Russell King

[permalink] [raw]
Subject: Re: Fix u32 vs. pm_message_t in arm

On Mon, Apr 04, 2005 at 10:02:35AM -0700, Linus Torvalds wrote:
>
>
> On Mon, 4 Apr 2005, Russell King wrote:
> >
> > Linus - is the pm.h included in sysdev.h in -rc2?
>
> Nope. Just includes kobject.h

Oh dear - in that case, most of ARM will be broken in -rc2. ;(

http://armlinux.simtec.co.uk/kautobuild/2.6.12-rc1-bk6/index.html

contains the bad news for -rc1-bk6, and -rc2 will be the same story.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core