diff options
Diffstat (limited to 'drivers/scsi/bvme6000_scsi.c')
-rw-r--r-- | drivers/scsi/bvme6000_scsi.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c index d858f3d4127..5799cb5cba6 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; |
@@ -58,7 +58,8 @@ bvme6000_probe(struct device *dev) | |||
58 | hostdata->ctest7_extra = CTEST7_TT1; | 58 | hostdata->ctest7_extra = CTEST7_TT1; |
59 | 59 | ||
60 | /* and register the chip */ | 60 | /* and register the chip */ |
61 | host = NCR_700_detect(&bvme6000_scsi_driver_template, hostdata, dev); | 61 | host = NCR_700_detect(&bvme6000_scsi_driver_template, hostdata, |
62 | &dev->dev); | ||
62 | if (!host) { | 63 | if (!host) { |
63 | printk(KERN_ERR "bvme6000-scsi: No host detected; " | 64 | printk(KERN_ERR "bvme6000-scsi: No host detected; " |
64 | "board configuration problem?\n"); | 65 | "board configuration problem?\n"); |
@@ -73,7 +74,7 @@ bvme6000_probe(struct device *dev) | |||
73 | goto out_put_host; | 74 | goto out_put_host; |
74 | } | 75 | } |
75 | 76 | ||
76 | dev_set_drvdata(dev, host); | 77 | platform_set_drvdata(dev, host); |
77 | scsi_scan_host(host); | 78 | scsi_scan_host(host); |
78 | 79 | ||
79 | return 0; | 80 | return 0; |
@@ -87,9 +88,9 @@ bvme6000_probe(struct device *dev) | |||
87 | } | 88 | } |
88 | 89 | ||
89 | static __devexit int | 90 | static __devexit int |
90 | bvme6000_device_remove(struct device *dev) | 91 | bvme6000_device_remove(struct platform_device *dev) |
91 | { | 92 | { |
92 | struct Scsi_Host *host = dev_get_drvdata(dev); | 93 | struct Scsi_Host *host = platform_get_drvdata(dev); |
93 | struct NCR_700_Host_Parameters *hostdata = shost_priv(host); | 94 | struct NCR_700_Host_Parameters *hostdata = shost_priv(host); |
94 | 95 | ||
95 | scsi_remove_host(host); | 96 | scsi_remove_host(host); |
@@ -100,25 +101,27 @@ bvme6000_device_remove(struct device *dev) | |||
100 | return 0; | 101 | return 0; |
101 | } | 102 | } |
102 | 103 | ||
103 | static struct device_driver bvme6000_scsi_driver = { | 104 | static struct platform_driver bvme6000_scsi_driver = { |
104 | .name = "bvme6000-scsi", | 105 | .driver = { |
105 | .bus = &platform_bus_type, | 106 | .name = "bvme6000-scsi", |
106 | .probe = bvme6000_probe, | 107 | .owner = THIS_MODULE, |
107 | .remove = __devexit_p(bvme6000_device_remove), | 108 | }, |
109 | .probe = bvme6000_probe, | ||
110 | .remove = __devexit_p(bvme6000_device_remove), | ||
108 | }; | 111 | }; |
109 | 112 | ||
110 | static int __init bvme6000_scsi_init(void) | 113 | static int __init bvme6000_scsi_init(void) |
111 | { | 114 | { |
112 | int err; | 115 | int err; |
113 | 116 | ||
114 | err = driver_register(&bvme6000_scsi_driver); | 117 | err = platform_driver_register(&bvme6000_scsi_driver); |
115 | if (err) | 118 | if (err) |
116 | return err; | 119 | return err; |
117 | 120 | ||
118 | bvme6000_scsi_device = platform_device_register_simple("bvme6000-scsi", | 121 | bvme6000_scsi_device = platform_device_register_simple("bvme6000-scsi", |
119 | -1, NULL, 0); | 122 | -1, NULL, 0); |
120 | if (IS_ERR(bvme6000_scsi_device)) { | 123 | if (IS_ERR(bvme6000_scsi_device)) { |
121 | driver_unregister(&bvme6000_scsi_driver); | 124 | platform_driver_unregister(&bvme6000_scsi_driver); |
122 | return PTR_ERR(bvme6000_scsi_device); | 125 | return PTR_ERR(bvme6000_scsi_device); |
123 | } | 126 | } |
124 | 127 | ||
@@ -128,7 +131,7 @@ static int __init bvme6000_scsi_init(void) | |||
128 | static void __exit bvme6000_scsi_exit(void) | 131 | static void __exit bvme6000_scsi_exit(void) |
129 | { | 132 | { |
130 | platform_device_unregister(bvme6000_scsi_device); | 133 | platform_device_unregister(bvme6000_scsi_device); |
131 | driver_unregister(&bvme6000_scsi_driver); | 134 | platform_driver_unregister(&bvme6000_scsi_driver); |
132 | } | 135 | } |
133 | 136 | ||
134 | module_init(bvme6000_scsi_init); | 137 | module_init(bvme6000_scsi_init); |