diff options
Diffstat (limited to 'drivers/scsi/bvme6000_scsi.c')
-rw-r--r-- | drivers/scsi/bvme6000_scsi.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c index d858f3d41274..9e9a82b03f2d 100644 --- a/drivers/scsi/bvme6000_scsi.c +++ b/drivers/scsi/bvme6000_scsi.c | |||
@@ -34,7 +34,7 @@ static struct scsi_host_template bvme6000_scsi_driver_template = { | |||
34 | static struct platform_device *bvme6000_scsi_device; | 34 | static struct platform_device *bvme6000_scsi_device; |
35 | 35 | ||
36 | static __devinit int | 36 | static __devinit int |
37 | bvme6000_probe(struct device *dev) | 37 | bvme6000_probe(struct platform_device *dev) |
38 | { | 38 | { |
39 | struct Scsi_Host *host; | 39 | struct Scsi_Host *host; |
40 | struct NCR_700_Host_Parameters *hostdata; | 40 | struct NCR_700_Host_Parameters *hostdata; |
@@ -73,7 +73,7 @@ bvme6000_probe(struct device *dev) | |||
73 | goto out_put_host; | 73 | goto out_put_host; |
74 | } | 74 | } |
75 | 75 | ||
76 | dev_set_drvdata(dev, host); | 76 | platform_set_drvdata(dev, host); |
77 | scsi_scan_host(host); | 77 | scsi_scan_host(host); |
78 | 78 | ||
79 | return 0; | 79 | return 0; |
@@ -87,9 +87,9 @@ bvme6000_probe(struct device *dev) | |||
87 | } | 87 | } |
88 | 88 | ||
89 | static __devexit int | 89 | static __devexit int |
90 | bvme6000_device_remove(struct device *dev) | 90 | bvme6000_device_remove(struct platform_device *dev) |
91 | { | 91 | { |
92 | struct Scsi_Host *host = dev_get_drvdata(dev); | 92 | struct Scsi_Host *host = platform_get_drvdata(dev); |
93 | struct NCR_700_Host_Parameters *hostdata = shost_priv(host); | 93 | struct NCR_700_Host_Parameters *hostdata = shost_priv(host); |
94 | 94 | ||
95 | scsi_remove_host(host); | 95 | scsi_remove_host(host); |
@@ -100,25 +100,27 @@ bvme6000_device_remove(struct device *dev) | |||
100 | return 0; | 100 | return 0; |
101 | } | 101 | } |
102 | 102 | ||
103 | static struct device_driver bvme6000_scsi_driver = { | 103 | static struct platform_driver bvme6000_scsi_driver = { |
104 | .name = "bvme6000-scsi", | 104 | .driver = { |
105 | .bus = &platform_bus_type, | 105 | .name = "bvme6000-scsi", |
106 | .probe = bvme6000_probe, | 106 | .owner = THIS_MODULE, |
107 | .remove = __devexit_p(bvme6000_device_remove), | 107 | }, |
108 | .probe = bvme6000_probe, | ||
109 | .remove = __devexit_p(bvme6000_device_remove), | ||
108 | }; | 110 | }; |
109 | 111 | ||
110 | static int __init bvme6000_scsi_init(void) | 112 | static int __init bvme6000_scsi_init(void) |
111 | { | 113 | { |
112 | int err; | 114 | int err; |
113 | 115 | ||
114 | err = driver_register(&bvme6000_scsi_driver); | 116 | err = platform_driver_register(&bvme6000_scsi_driver); |
115 | if (err) | 117 | if (err) |
116 | return err; | 118 | return err; |
117 | 119 | ||
118 | bvme6000_scsi_device = platform_device_register_simple("bvme6000-scsi", | 120 | bvme6000_scsi_device = platform_device_register_simple("bvme6000-scsi", |
119 | -1, NULL, 0); | 121 | -1, NULL, 0); |
120 | if (IS_ERR(bvme6000_scsi_device)) { | 122 | if (IS_ERR(bvme6000_scsi_device)) { |
121 | driver_unregister(&bvme6000_scsi_driver); | 123 | platform_driver_unregister(&bvme6000_scsi_driver); |
122 | return PTR_ERR(bvme6000_scsi_device); | 124 | return PTR_ERR(bvme6000_scsi_device); |
123 | } | 125 | } |
124 | 126 | ||
@@ -128,7 +130,7 @@ static int __init bvme6000_scsi_init(void) | |||
128 | static void __exit bvme6000_scsi_exit(void) | 130 | static void __exit bvme6000_scsi_exit(void) |
129 | { | 131 | { |
130 | platform_device_unregister(bvme6000_scsi_device); | 132 | platform_device_unregister(bvme6000_scsi_device); |
131 | driver_unregister(&bvme6000_scsi_driver); | 133 | platform_driver_unregister(&bvme6000_scsi_driver); |
132 | } | 134 | } |
133 | 135 | ||
134 | module_init(bvme6000_scsi_init); | 136 | module_init(bvme6000_scsi_init); |