diff options
| author | Russell King <rmk+lkml@arm.linux.org.uk> | 2005-01-03 04:59:43 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-03 04:59:43 -0800 |
| commit | e33b4fa5ac6cf96f7a56cad4ec8cbec2774f45eb (patch) | |
| tree | 98ff864bc2bf158bf77b8a08e85609d14c94a7d2 /include/linux | |
| parent | 812e53a9178760d3cca222b2160f181e64195265 (diff) | |
[PATCH] typeof(dev->power.saved_state)
arch/arm/common/sa1111.c: In function `sa1111_suspend':
arch/arm/common/sa1111.c:816: warning: assignment from incompatible pointer type
This is a rather annoying, and IMHO pointless warning. First question:
what is the reasoning for using an array of unsigned bytes here? Are we
expecting to power manage devices which only have byte wide registers?
In reality, devices have half-word and word sized registers as well, which
means that dev->power.saved_state actually points to device specific data
(or even device driver specific data) for the device. As such, it makes
far more sense for this to be a 'void *'.
I'd rather not go around the ARM kernel tree adding pointless casts to 'u8
*' and back again because the wrong type for this was picked in the
structure definition, so here's a patch which changes this to void *.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h index 23759764849f..68da2eae8547 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -226,7 +226,7 @@ struct dev_pm_info { u32 power_state; #ifdef CONFIG_PM u32 prev_state; - u8 * saved_state; + void * saved_state; atomic_t pm_users; struct device * pm_parent; struct list_head entry; |
