aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/hdpuftrs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-11 12:24:26 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-11 12:24:26 -0500
commit5643f000c1e10ab991182478b76550e1364c3570 (patch)
tree950b2f61a5dd742de1c668ba968a9c8a99f1eab6 /drivers/misc/hdpuftrs
parent177294d19174cf92de22434bb1fc9a8ecdbbe658 (diff)
parent3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
Diffstat (limited to 'drivers/misc/hdpuftrs')
-rw-r--r--drivers/misc/hdpuftrs/hdpu_cpustate.c20
-rw-r--r--drivers/misc/hdpuftrs/hdpu_nexus.c20
2 files changed, 20 insertions, 20 deletions
diff --git a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c
index bc2b72b32905..11a801be71c8 100644
--- a/drivers/misc/hdpuftrs/hdpu_cpustate.c
+++ b/drivers/misc/hdpuftrs/hdpu_cpustate.c
@@ -26,8 +26,8 @@
26 26
27#define SKY_CPUSTATE_VERSION "1.1" 27#define SKY_CPUSTATE_VERSION "1.1"
28 28
29static int hdpu_cpustate_probe(struct device *ddev); 29static int hdpu_cpustate_probe(struct platform_device *pdev);
30static int hdpu_cpustate_remove(struct device *ddev); 30static int hdpu_cpustate_remove(struct platform_device *pdev);
31 31
32struct cpustate_t cpustate; 32struct cpustate_t cpustate;
33 33
@@ -158,11 +158,12 @@ static int cpustate_read_proc(char *page, char **start, off_t off,
158 return len; 158 return len;
159} 159}
160 160
161static struct device_driver hdpu_cpustate_driver = { 161static struct platform_driver hdpu_cpustate_driver = {
162 .name = HDPU_CPUSTATE_NAME,
163 .bus = &platform_bus_type,
164 .probe = hdpu_cpustate_probe, 162 .probe = hdpu_cpustate_probe,
165 .remove = hdpu_cpustate_remove, 163 .remove = hdpu_cpustate_remove,
164 .driver = {
165 .name = HDPU_CPUSTATE_NAME,
166 },
166}; 167};
167 168
168/* 169/*
@@ -187,9 +188,8 @@ static struct miscdevice cpustate_dev = {
187 &cpustate_fops 188 &cpustate_fops
188}; 189};
189 190
190static int hdpu_cpustate_probe(struct device *ddev) 191static int hdpu_cpustate_probe(struct platform_device *pdev)
191{ 192{
192 struct platform_device *pdev = to_platform_device(ddev);
193 struct resource *res; 193 struct resource *res;
194 struct proc_dir_entry *proc_de; 194 struct proc_dir_entry *proc_de;
195 int ret; 195 int ret;
@@ -217,7 +217,7 @@ static int hdpu_cpustate_probe(struct device *ddev)
217 return 0; 217 return 0;
218} 218}
219 219
220static int hdpu_cpustate_remove(struct device *ddev) 220static int hdpu_cpustate_remove(struct platform_device *pdev)
221{ 221{
222 222
223 cpustate.set_addr = NULL; 223 cpustate.set_addr = NULL;
@@ -232,13 +232,13 @@ static int hdpu_cpustate_remove(struct device *ddev)
232static int __init cpustate_init(void) 232static int __init cpustate_init(void)
233{ 233{
234 int rc; 234 int rc;
235 rc = driver_register(&hdpu_cpustate_driver); 235 rc = platform_driver_register(&hdpu_cpustate_driver);
236 return rc; 236 return rc;
237} 237}
238 238
239static void __exit cpustate_exit(void) 239static void __exit cpustate_exit(void)
240{ 240{
241 driver_unregister(&hdpu_cpustate_driver); 241 platform_driver_unregister(&hdpu_cpustate_driver);
242} 242}
243 243
244module_init(cpustate_init); 244module_init(cpustate_init);
diff --git a/drivers/misc/hdpuftrs/hdpu_nexus.c b/drivers/misc/hdpuftrs/hdpu_nexus.c
index 4bb461793851..ea9d5f233c83 100644
--- a/drivers/misc/hdpuftrs/hdpu_nexus.c
+++ b/drivers/misc/hdpuftrs/hdpu_nexus.c
@@ -22,19 +22,20 @@
22 22
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24 24
25static int hdpu_nexus_probe(struct device *ddev); 25static int hdpu_nexus_probe(struct platform_device *pdev);
26static int hdpu_nexus_remove(struct device *ddev); 26static int hdpu_nexus_remove(struct platform_device *pdev);
27 27
28static struct proc_dir_entry *hdpu_slot_id; 28static struct proc_dir_entry *hdpu_slot_id;
29static struct proc_dir_entry *hdpu_chassis_id; 29static struct proc_dir_entry *hdpu_chassis_id;
30static int slot_id = -1; 30static int slot_id = -1;
31static int chassis_id = -1; 31static int chassis_id = -1;
32 32
33static struct device_driver hdpu_nexus_driver = { 33static struct platform_driver hdpu_nexus_driver = {
34 .name = HDPU_NEXUS_NAME,
35 .bus = &platform_bus_type,
36 .probe = hdpu_nexus_probe, 34 .probe = hdpu_nexus_probe,
37 .remove = hdpu_nexus_remove, 35 .remove = hdpu_nexus_remove,
36 .driver = {
37 .name = HDPU_NEXUS_NAME,
38 },
38}; 39};
39 40
40int hdpu_slot_id_read(char *buffer, char **buffer_location, off_t offset, 41int hdpu_slot_id_read(char *buffer, char **buffer_location, off_t offset,
@@ -55,9 +56,8 @@ int hdpu_chassis_id_read(char *buffer, char **buffer_location, off_t offset,
55 return sprintf(buffer, "%d\n", chassis_id); 56 return sprintf(buffer, "%d\n", chassis_id);
56} 57}
57 58
58static int hdpu_nexus_probe(struct device *ddev) 59static int hdpu_nexus_probe(struct platform_device *pdev)
59{ 60{
60 struct platform_device *pdev = to_platform_device(ddev);
61 struct resource *res; 61 struct resource *res;
62 62
63 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 63 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -80,7 +80,7 @@ static int hdpu_nexus_probe(struct device *ddev)
80 return 0; 80 return 0;
81} 81}
82 82
83static int hdpu_nexus_remove(struct device *ddev) 83static int hdpu_nexus_remove(struct platform_device *pdev)
84{ 84{
85 slot_id = -1; 85 slot_id = -1;
86 chassis_id = -1; 86 chassis_id = -1;
@@ -94,13 +94,13 @@ static int hdpu_nexus_remove(struct device *ddev)
94static int __init nexus_init(void) 94static int __init nexus_init(void)
95{ 95{
96 int rc; 96 int rc;
97 rc = driver_register(&hdpu_nexus_driver); 97 rc = platform_driver_register(&hdpu_nexus_driver);
98 return rc; 98 return rc;
99} 99}
100 100
101static void __exit nexus_exit(void) 101static void __exit nexus_exit(void)
102{ 102{
103 driver_unregister(&hdpu_nexus_driver); 103 platform_driver_unregister(&hdpu_nexus_driver);
104} 104}
105 105
106module_init(nexus_init); 106module_init(nexus_init);