diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-11 12:24:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-11 12:24:26 -0500 |
commit | 5643f000c1e10ab991182478b76550e1364c3570 (patch) | |
tree | 950b2f61a5dd742de1c668ba968a9c8a99f1eab6 /drivers/misc/hdpuftrs/hdpu_nexus.c | |
parent | 177294d19174cf92de22434bb1fc9a8ecdbbe658 (diff) | |
parent | 3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
Diffstat (limited to 'drivers/misc/hdpuftrs/hdpu_nexus.c')
-rw-r--r-- | drivers/misc/hdpuftrs/hdpu_nexus.c | 20 |
1 files changed, 10 insertions, 10 deletions
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 | ||
25 | static int hdpu_nexus_probe(struct device *ddev); | 25 | static int hdpu_nexus_probe(struct platform_device *pdev); |
26 | static int hdpu_nexus_remove(struct device *ddev); | 26 | static int hdpu_nexus_remove(struct platform_device *pdev); |
27 | 27 | ||
28 | static struct proc_dir_entry *hdpu_slot_id; | 28 | static struct proc_dir_entry *hdpu_slot_id; |
29 | static struct proc_dir_entry *hdpu_chassis_id; | 29 | static struct proc_dir_entry *hdpu_chassis_id; |
30 | static int slot_id = -1; | 30 | static int slot_id = -1; |
31 | static int chassis_id = -1; | 31 | static int chassis_id = -1; |
32 | 32 | ||
33 | static struct device_driver hdpu_nexus_driver = { | 33 | static 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 | ||
40 | int hdpu_slot_id_read(char *buffer, char **buffer_location, off_t offset, | 41 | int 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 | ||
58 | static int hdpu_nexus_probe(struct device *ddev) | 59 | static 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 | ||
83 | static int hdpu_nexus_remove(struct device *ddev) | 83 | static 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) | |||
94 | static int __init nexus_init(void) | 94 | static 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 | ||
101 | static void __exit nexus_exit(void) | 101 | static void __exit nexus_exit(void) |
102 | { | 102 | { |
103 | driver_unregister(&hdpu_nexus_driver); | 103 | platform_driver_unregister(&hdpu_nexus_driver); |
104 | } | 104 | } |
105 | 105 | ||
106 | module_init(nexus_init); | 106 | module_init(nexus_init); |