diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-03-23 10:40:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-22 14:10:32 -0400 |
commit | 568825c8ed3c902981ce908ed5693abb3c9ddf59 (patch) | |
tree | 29d37359823ea8439f5b51bf9632d31440a9f559 /drivers/hwmon | |
parent | 59ac83677f72ea2cc25b5426e7df9589aa7a5384 (diff) |
[PATCH] f71805f: Resource needs not be global
The F71805F I/O resource structure needs not be a global variable,
as the platform core allocs its own copy of it anyway.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/f71805f.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c index 885465df6e6a..fd72440faf76 100644 --- a/drivers/hwmon/f71805f.c +++ b/drivers/hwmon/f71805f.c | |||
@@ -99,10 +99,6 @@ superio_exit(int base) | |||
99 | #define ADDR_REG_OFFSET 0 | 99 | #define ADDR_REG_OFFSET 0 |
100 | #define DATA_REG_OFFSET 1 | 100 | #define DATA_REG_OFFSET 1 |
101 | 101 | ||
102 | static struct resource f71805f_resource __initdata = { | ||
103 | .flags = IORESOURCE_IO, | ||
104 | }; | ||
105 | |||
106 | /* | 102 | /* |
107 | * Registers | 103 | * Registers |
108 | */ | 104 | */ |
@@ -782,6 +778,11 @@ static struct platform_driver f71805f_driver = { | |||
782 | 778 | ||
783 | static int __init f71805f_device_add(unsigned short address) | 779 | static int __init f71805f_device_add(unsigned short address) |
784 | { | 780 | { |
781 | struct resource res = { | ||
782 | .start = address, | ||
783 | .end = address + REGION_LENGTH - 1, | ||
784 | .flags = IORESOURCE_IO, | ||
785 | }; | ||
785 | int err; | 786 | int err; |
786 | 787 | ||
787 | pdev = platform_device_alloc(DRVNAME, address); | 788 | pdev = platform_device_alloc(DRVNAME, address); |
@@ -791,10 +792,8 @@ static int __init f71805f_device_add(unsigned short address) | |||
791 | goto exit; | 792 | goto exit; |
792 | } | 793 | } |
793 | 794 | ||
794 | f71805f_resource.start = address; | 795 | res.name = pdev->name; |
795 | f71805f_resource.end = address + REGION_LENGTH - 1; | 796 | err = platform_device_add_resources(pdev, &res, 1); |
796 | f71805f_resource.name = pdev->name; | ||
797 | err = platform_device_add_resources(pdev, &f71805f_resource, 1); | ||
798 | if (err) { | 797 | if (err) { |
799 | printk(KERN_ERR DRVNAME ": Device resource addition failed " | 798 | printk(KERN_ERR DRVNAME ": Device resource addition failed " |
800 | "(%d)\n", err); | 799 | "(%d)\n", err); |