aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 14:17:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 14:17:04 -0400
commit0c93ea4064a209cdc36de8a9a3003d43d08f46f7 (patch)
treeff19952407c523a1349ef56c05993416dd28437e /drivers/scsi
parentbc2fd381d8f9dbeb181f82286cdca1567e3d0def (diff)
parente6e66b02e11563abdb7f69dcb7a2efbd8d577e77 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (61 commits) Dynamic debug: fix pr_fmt() build error Dynamic debug: allow simple quoting of words dynamic debug: update docs dynamic debug: combine dprintk and dynamic printk sysfs: fix some bin_vm_ops errors kobject: don't block for each kobject_uevent sysfs: only allow one scheduled removal callback per kobj Driver core: Fix device_move() vs. dpm list ordering, v2 Driver core: some cleanup on drivers/base/sys.c Driver core: implement uevent suppress in kobject vcs: hook sysfs devices into object lifetime instead of "binding" driver core: fix passing platform_data driver core: move platform_data into platform_device sysfs: don't block indefinitely for unmapped files. driver core: move knode_bus into private structure driver core: move knode_driver into private structure driver core: move klist_children into private structure driver core: create a private portion of struct device driver core: remove polling for driver_probe_done(v5) sysfs: reference sysfs_dirent from sysfs inodes ... Fixed conflicts in drivers/sh/maple/maple.c manually
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/a4000t.c29
-rw-r--r--drivers/scsi/bvme6000_scsi.c29
-rw-r--r--drivers/scsi/mvme16x_scsi.c29
3 files changed, 48 insertions, 39 deletions
diff --git a/drivers/scsi/a4000t.c b/drivers/scsi/a4000t.c
index d4bda2017746..61af3d91ac8a 100644
--- a/drivers/scsi/a4000t.c
+++ b/drivers/scsi/a4000t.c
@@ -35,7 +35,7 @@ static struct platform_device *a4000t_scsi_device;
35 35
36#define A4000T_SCSI_ADDR 0xdd0040 36#define A4000T_SCSI_ADDR 0xdd0040
37 37
38static int __devinit a4000t_probe(struct device *dev) 38static int __devinit a4000t_probe(struct platform_device *dev)
39{ 39{
40 struct Scsi_Host *host; 40 struct Scsi_Host *host;
41 struct NCR_700_Host_Parameters *hostdata; 41 struct NCR_700_Host_Parameters *hostdata;
@@ -61,7 +61,8 @@ static int __devinit a4000t_probe(struct device *dev)
61 hostdata->dcntl_extra = EA_710; 61 hostdata->dcntl_extra = EA_710;
62 62
63 /* and register the chip */ 63 /* and register the chip */
64 host = NCR_700_detect(&a4000t_scsi_driver_template, hostdata, dev); 64 host = NCR_700_detect(&a4000t_scsi_driver_template, hostdata,
65 &dev->dev);
65 if (!host) { 66 if (!host) {
66 printk(KERN_ERR "a4000t-scsi: No host detected; " 67 printk(KERN_ERR "a4000t-scsi: No host detected; "
67 "board configuration problem?\n"); 68 "board configuration problem?\n");
@@ -78,7 +79,7 @@ static int __devinit a4000t_probe(struct device *dev)
78 goto out_put_host; 79 goto out_put_host;
79 } 80 }
80 81
81 dev_set_drvdata(dev, host); 82 platform_set_drvdata(dev, host);
82 scsi_scan_host(host); 83 scsi_scan_host(host);
83 84
84 return 0; 85 return 0;
@@ -93,9 +94,9 @@ static int __devinit a4000t_probe(struct device *dev)
93 return -ENODEV; 94 return -ENODEV;
94} 95}
95 96
96static __devexit int a4000t_device_remove(struct device *dev) 97static __devexit int a4000t_device_remove(struct platform_device *dev)
97{ 98{
98 struct Scsi_Host *host = dev_get_drvdata(dev); 99 struct Scsi_Host *host = platform_get_drvdata(dev);
99 struct NCR_700_Host_Parameters *hostdata = shost_priv(host); 100 struct NCR_700_Host_Parameters *hostdata = shost_priv(host);
100 101
101 scsi_remove_host(host); 102 scsi_remove_host(host);
@@ -108,25 +109,27 @@ static __devexit int a4000t_device_remove(struct device *dev)
108 return 0; 109 return 0;
109} 110}
110 111
111static struct device_driver a4000t_scsi_driver = { 112static struct platform_driver a4000t_scsi_driver = {
112 .name = "a4000t-scsi", 113 .driver = {
113 .bus = &platform_bus_type, 114 .name = "a4000t-scsi",
114 .probe = a4000t_probe, 115 .owner = THIS_MODULE,
115 .remove = __devexit_p(a4000t_device_remove), 116 },
117 .probe = a4000t_probe,
118 .remove = __devexit_p(a4000t_device_remove),
116}; 119};
117 120
118static int __init a4000t_scsi_init(void) 121static int __init a4000t_scsi_init(void)
119{ 122{
120 int err; 123 int err;
121 124
122 err = driver_register(&a4000t_scsi_driver); 125 err = platform_driver_register(&a4000t_scsi_driver);
123 if (err) 126 if (err)
124 return err; 127 return err;
125 128
126 a4000t_scsi_device = platform_device_register_simple("a4000t-scsi", 129 a4000t_scsi_device = platform_device_register_simple("a4000t-scsi",
127 -1, NULL, 0); 130 -1, NULL, 0);
128 if (IS_ERR(a4000t_scsi_device)) { 131 if (IS_ERR(a4000t_scsi_device)) {
129 driver_unregister(&a4000t_scsi_driver); 132 platform_driver_register(&a4000t_scsi_driver);
130 return PTR_ERR(a4000t_scsi_device); 133 return PTR_ERR(a4000t_scsi_device);
131 } 134 }
132 135
@@ -136,7 +139,7 @@ static int __init a4000t_scsi_init(void)
136static void __exit a4000t_scsi_exit(void) 139static void __exit a4000t_scsi_exit(void)
137{ 140{
138 platform_device_unregister(a4000t_scsi_device); 141 platform_device_unregister(a4000t_scsi_device);
139 driver_unregister(&a4000t_scsi_driver); 142 platform_driver_unregister(&a4000t_scsi_driver);
140} 143}
141 144
142module_init(a4000t_scsi_init); 145module_init(a4000t_scsi_init);
diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c
index d858f3d41274..5799cb5cba6b 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 = {
34static struct platform_device *bvme6000_scsi_device; 34static struct platform_device *bvme6000_scsi_device;
35 35
36static __devinit int 36static __devinit int
37bvme6000_probe(struct device *dev) 37bvme6000_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
89static __devexit int 90static __devexit int
90bvme6000_device_remove(struct device *dev) 91bvme6000_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
103static struct device_driver bvme6000_scsi_driver = { 104static 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
110static int __init bvme6000_scsi_init(void) 113static 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)
128static void __exit bvme6000_scsi_exit(void) 131static 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
134module_init(bvme6000_scsi_init); 137module_init(bvme6000_scsi_init);
diff --git a/drivers/scsi/mvme16x_scsi.c b/drivers/scsi/mvme16x_scsi.c
index b264b499d982..b5fbfd6ce870 100644
--- a/drivers/scsi/mvme16x_scsi.c
+++ b/drivers/scsi/mvme16x_scsi.c
@@ -34,7 +34,7 @@ static struct scsi_host_template mvme16x_scsi_driver_template = {
34static struct platform_device *mvme16x_scsi_device; 34static struct platform_device *mvme16x_scsi_device;
35 35
36static __devinit int 36static __devinit int
37mvme16x_probe(struct device *dev) 37mvme16x_probe(struct platform_device *dev)
38{ 38{
39 struct Scsi_Host * host = NULL; 39 struct Scsi_Host * host = NULL;
40 struct NCR_700_Host_Parameters *hostdata; 40 struct NCR_700_Host_Parameters *hostdata;
@@ -64,7 +64,8 @@ mvme16x_probe(struct device *dev)
64 hostdata->ctest7_extra = CTEST7_TT1; 64 hostdata->ctest7_extra = CTEST7_TT1;
65 65
66 /* and register the chip */ 66 /* and register the chip */
67 host = NCR_700_detect(&mvme16x_scsi_driver_template, hostdata, dev); 67 host = NCR_700_detect(&mvme16x_scsi_driver_template, hostdata,
68 &dev->dev);
68 if (!host) { 69 if (!host) {
69 printk(KERN_ERR "mvme16x-scsi: No host detected; " 70 printk(KERN_ERR "mvme16x-scsi: No host detected; "
70 "board configuration problem?\n"); 71 "board configuration problem?\n");
@@ -88,7 +89,7 @@ mvme16x_probe(struct device *dev)
88 out_be32(0xfff4202c, v); 89 out_be32(0xfff4202c, v);
89 } 90 }
90 91
91 dev_set_drvdata(dev, host); 92 platform_set_drvdata(dev, host);
92 scsi_scan_host(host); 93 scsi_scan_host(host);
93 94
94 return 0; 95 return 0;
@@ -102,9 +103,9 @@ mvme16x_probe(struct device *dev)
102} 103}
103 104
104static __devexit int 105static __devexit int
105mvme16x_device_remove(struct device *dev) 106mvme16x_device_remove(struct platform_device *dev)
106{ 107{
107 struct Scsi_Host *host = dev_get_drvdata(dev); 108 struct Scsi_Host *host = platform_get_drvdata(dev);
108 struct NCR_700_Host_Parameters *hostdata = shost_priv(host); 109 struct NCR_700_Host_Parameters *hostdata = shost_priv(host);
109 110
110 /* Disable scsi chip ints */ 111 /* Disable scsi chip ints */
@@ -123,25 +124,27 @@ mvme16x_device_remove(struct device *dev)
123 return 0; 124 return 0;
124} 125}
125 126
126static struct device_driver mvme16x_scsi_driver = { 127static struct platform_driver mvme16x_scsi_driver = {
127 .name = "mvme16x-scsi", 128 .driver = {
128 .bus = &platform_bus_type, 129 .name = "mvme16x-scsi",
129 .probe = mvme16x_probe, 130 .owner = THIS_MODULE,
130 .remove = __devexit_p(mvme16x_device_remove), 131 },
132 .probe = mvme16x_probe,
133 .remove = __devexit_p(mvme16x_device_remove),
131}; 134};
132 135
133static int __init mvme16x_scsi_init(void) 136static int __init mvme16x_scsi_init(void)
134{ 137{
135 int err; 138 int err;
136 139
137 err = driver_register(&mvme16x_scsi_driver); 140 err = platform_driver_register(&mvme16x_scsi_driver);
138 if (err) 141 if (err)
139 return err; 142 return err;
140 143
141 mvme16x_scsi_device = platform_device_register_simple("mvme16x-scsi", 144 mvme16x_scsi_device = platform_device_register_simple("mvme16x-scsi",
142 -1, NULL, 0); 145 -1, NULL, 0);
143 if (IS_ERR(mvme16x_scsi_device)) { 146 if (IS_ERR(mvme16x_scsi_device)) {
144 driver_unregister(&mvme16x_scsi_driver); 147 platform_driver_unregister(&mvme16x_scsi_driver);
145 return PTR_ERR(mvme16x_scsi_device); 148 return PTR_ERR(mvme16x_scsi_device);
146 } 149 }
147 150
@@ -151,7 +154,7 @@ static int __init mvme16x_scsi_init(void)
151static void __exit mvme16x_scsi_exit(void) 154static void __exit mvme16x_scsi_exit(void)
152{ 155{
153 platform_device_unregister(mvme16x_scsi_device); 156 platform_device_unregister(mvme16x_scsi_device);
154 driver_unregister(&mvme16x_scsi_driver); 157 platform_driver_unregister(&mvme16x_scsi_driver);
155} 158}
156 159
157module_init(mvme16x_scsi_init); 160module_init(mvme16x_scsi_init);