aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorYani Ioannou <yani.ioannou@gmail.com>2005-05-17 06:43:37 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:35 -0400
commit10523b3b82456e416cbaffcc24ea2246980aa746 (patch)
treefab3ac16bffb04cc25683e83a583b1cae3f0d450 /drivers/scsi
parent3fd3c0a5f53a0f9d8987b90acbd84f7dd8ef606e (diff)
[PATCH] Driver Core: drivers/s390/net/qeth_sys.c - drivers/usb/gadget/pxa2xx_udc.c: update device attribute callbacks
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/53c700.c2
-rw-r--r--drivers/scsi/arm/eesox.c4
-rw-r--r--drivers/scsi/arm/powertec.c4
-rw-r--r--drivers/scsi/ipr.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c4
-rw-r--r--drivers/scsi/scsi_sysfs.c28
6 files changed, 22 insertions, 22 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index d151af9a6f15..a7620fc368e7 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -2125,7 +2125,7 @@ static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type)
2125} 2125}
2126 2126
2127static ssize_t 2127static ssize_t
2128NCR_700_show_active_tags(struct device *dev, char *buf) 2128NCR_700_show_active_tags(struct device *dev, struct device_attribute *attr, char *buf)
2129{ 2129{
2130 struct scsi_device *SDp = to_scsi_device(dev); 2130 struct scsi_device *SDp = to_scsi_device(dev);
2131 2131
diff --git a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c
index 78b7e543471b..ce711f166cfb 100644
--- a/drivers/scsi/arm/eesox.c
+++ b/drivers/scsi/arm/eesox.c
@@ -466,7 +466,7 @@ int eesoxscsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_
466 return pos; 466 return pos;
467} 467}
468 468
469static ssize_t eesoxscsi_show_term(struct device *dev, char *buf) 469static ssize_t eesoxscsi_show_term(struct device *dev, struct device_attribute *attr, char *buf)
470{ 470{
471 struct expansion_card *ec = ECARD_DEV(dev); 471 struct expansion_card *ec = ECARD_DEV(dev);
472 struct Scsi_Host *host = ecard_get_drvdata(ec); 472 struct Scsi_Host *host = ecard_get_drvdata(ec);
@@ -475,7 +475,7 @@ static ssize_t eesoxscsi_show_term(struct device *dev, char *buf)
475 return sprintf(buf, "%d\n", info->control & EESOX_TERM_ENABLE ? 1 : 0); 475 return sprintf(buf, "%d\n", info->control & EESOX_TERM_ENABLE ? 1 : 0);
476} 476}
477 477
478static ssize_t eesoxscsi_store_term(struct device *dev, const char *buf, size_t len) 478static ssize_t eesoxscsi_store_term(struct device *dev, struct device_attribute *attr, const char *buf, size_t len)
479{ 479{
480 struct expansion_card *ec = ECARD_DEV(dev); 480 struct expansion_card *ec = ECARD_DEV(dev);
481 struct Scsi_Host *host = ecard_get_drvdata(ec); 481 struct Scsi_Host *host = ecard_get_drvdata(ec);
diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c
index 54f23be6460f..abda216113f1 100644
--- a/drivers/scsi/arm/powertec.c
+++ b/drivers/scsi/arm/powertec.c
@@ -269,7 +269,7 @@ int powertecscsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, o
269 return pos; 269 return pos;
270} 270}
271 271
272static ssize_t powertecscsi_show_term(struct device *dev, char *buf) 272static ssize_t powertecscsi_show_term(struct device *dev, struct device_attribute *attr, char *buf)
273{ 273{
274 struct expansion_card *ec = ECARD_DEV(dev); 274 struct expansion_card *ec = ECARD_DEV(dev);
275 struct Scsi_Host *host = ecard_get_drvdata(ec); 275 struct Scsi_Host *host = ecard_get_drvdata(ec);
@@ -279,7 +279,7 @@ static ssize_t powertecscsi_show_term(struct device *dev, char *buf)
279} 279}
280 280
281static ssize_t 281static ssize_t
282powertecscsi_store_term(struct device *dev, const char *buf, size_t len) 282powertecscsi_store_term(struct device *dev, struct device_attribute *attr, const char *buf, size_t len)
283{ 283{
284 struct expansion_card *ec = ECARD_DEV(dev); 284 struct expansion_card *ec = ECARD_DEV(dev);
285 struct Scsi_Host *host = ecard_get_drvdata(ec); 285 struct Scsi_Host *host = ecard_get_drvdata(ec);
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 17b106b79f72..80d022625c82 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -2716,7 +2716,7 @@ static int ipr_change_queue_type(struct scsi_device *sdev, int tag_type)
2716 * Return value: 2716 * Return value:
2717 * number of bytes printed to buffer 2717 * number of bytes printed to buffer
2718 **/ 2718 **/
2719static ssize_t ipr_show_adapter_handle(struct device *dev, char *buf) 2719static ssize_t ipr_show_adapter_handle(struct device *dev, struct device_attribute *attr, char *buf)
2720{ 2720{
2721 struct scsi_device *sdev = to_scsi_device(dev); 2721 struct scsi_device *sdev = to_scsi_device(dev);
2722 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; 2722 struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata;
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 057ed45b54b2..cbe430246276 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -124,7 +124,7 @@ static irqreturn_t megaraid_isr(int, void *, struct pt_regs *);
124static void megaraid_mbox_dpc(unsigned long); 124static void megaraid_mbox_dpc(unsigned long);
125 125
126static ssize_t megaraid_sysfs_show_app_hndl(struct class_device *, char *); 126static ssize_t megaraid_sysfs_show_app_hndl(struct class_device *, char *);
127static ssize_t megaraid_sysfs_show_ldnum(struct device *, char *); 127static ssize_t megaraid_sysfs_show_ldnum(struct device *, struct device_attribute *attr, char *);
128 128
129static int megaraid_cmm_register(adapter_t *); 129static int megaraid_cmm_register(adapter_t *);
130static int megaraid_cmm_unregister(adapter_t *); 130static int megaraid_cmm_unregister(adapter_t *);
@@ -4145,7 +4145,7 @@ megaraid_sysfs_show_app_hndl(struct class_device *cdev, char *buf)
4145 * @param buf : buffer to send data to 4145 * @param buf : buffer to send data to
4146 */ 4146 */
4147static ssize_t 4147static ssize_t
4148megaraid_sysfs_show_ldnum(struct device *dev, char *buf) 4148megaraid_sysfs_show_ldnum(struct device *dev, struct device_attribute *attr, char *buf)
4149{ 4149{
4150 struct scsi_device *sdev = to_scsi_device(dev); 4150 struct scsi_device *sdev = to_scsi_device(dev);
4151 adapter_t *adapter = (adapter_t *)SCSIHOST2ADAP(sdev->host); 4151 adapter_t *adapter = (adapter_t *)SCSIHOST2ADAP(sdev->host);
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 7134618f0a1f..93b41100a6d8 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -230,7 +230,7 @@ void scsi_sysfs_unregister(void)
230 */ 230 */
231#define sdev_show_function(field, format_string) \ 231#define sdev_show_function(field, format_string) \
232static ssize_t \ 232static ssize_t \
233sdev_show_##field (struct device *dev, char *buf) \ 233sdev_show_##field (struct device *dev, struct device_attribute *attr, char *buf) \
234{ \ 234{ \
235 struct scsi_device *sdev; \ 235 struct scsi_device *sdev; \
236 sdev = to_scsi_device(dev); \ 236 sdev = to_scsi_device(dev); \
@@ -254,7 +254,7 @@ static DEVICE_ATTR(field, S_IRUGO, sdev_show_##field, NULL);
254 sdev_show_function(field, format_string) \ 254 sdev_show_function(field, format_string) \
255 \ 255 \
256static ssize_t \ 256static ssize_t \
257sdev_store_##field (struct device *dev, const char *buf, size_t count) \ 257sdev_store_##field (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \
258{ \ 258{ \
259 struct scsi_device *sdev; \ 259 struct scsi_device *sdev; \
260 sdev = to_scsi_device(dev); \ 260 sdev = to_scsi_device(dev); \
@@ -274,7 +274,7 @@ static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##fie
274 sdev_show_function(field, "%d\n") \ 274 sdev_show_function(field, "%d\n") \
275 \ 275 \
276static ssize_t \ 276static ssize_t \
277sdev_store_##field (struct device *dev, const char *buf, size_t count) \ 277sdev_store_##field (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \
278{ \ 278{ \
279 int ret; \ 279 int ret; \
280 struct scsi_device *sdev; \ 280 struct scsi_device *sdev; \
@@ -317,7 +317,7 @@ sdev_rd_attr (model, "%.16s\n");
317sdev_rd_attr (rev, "%.4s\n"); 317sdev_rd_attr (rev, "%.4s\n");
318 318
319static ssize_t 319static ssize_t
320sdev_show_timeout (struct device *dev, char *buf) 320sdev_show_timeout (struct device *dev, struct device_attribute *attr, char *buf)
321{ 321{
322 struct scsi_device *sdev; 322 struct scsi_device *sdev;
323 sdev = to_scsi_device(dev); 323 sdev = to_scsi_device(dev);
@@ -325,7 +325,7 @@ sdev_show_timeout (struct device *dev, char *buf)
325} 325}
326 326
327static ssize_t 327static ssize_t
328sdev_store_timeout (struct device *dev, const char *buf, size_t count) 328sdev_store_timeout (struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
329{ 329{
330 struct scsi_device *sdev; 330 struct scsi_device *sdev;
331 int timeout; 331 int timeout;
@@ -337,14 +337,14 @@ sdev_store_timeout (struct device *dev, const char *buf, size_t count)
337static DEVICE_ATTR(timeout, S_IRUGO | S_IWUSR, sdev_show_timeout, sdev_store_timeout); 337static DEVICE_ATTR(timeout, S_IRUGO | S_IWUSR, sdev_show_timeout, sdev_store_timeout);
338 338
339static ssize_t 339static ssize_t
340store_rescan_field (struct device *dev, const char *buf, size_t count) 340store_rescan_field (struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
341{ 341{
342 scsi_rescan_device(dev); 342 scsi_rescan_device(dev);
343 return count; 343 return count;
344} 344}
345static DEVICE_ATTR(rescan, S_IWUSR, NULL, store_rescan_field); 345static DEVICE_ATTR(rescan, S_IWUSR, NULL, store_rescan_field);
346 346
347static ssize_t sdev_store_delete(struct device *dev, const char *buf, 347static ssize_t sdev_store_delete(struct device *dev, struct device_attribute *attr, const char *buf,
348 size_t count) 348 size_t count)
349{ 349{
350 scsi_remove_device(to_scsi_device(dev)); 350 scsi_remove_device(to_scsi_device(dev));
@@ -353,7 +353,7 @@ static ssize_t sdev_store_delete(struct device *dev, const char *buf,
353static DEVICE_ATTR(delete, S_IWUSR, NULL, sdev_store_delete); 353static DEVICE_ATTR(delete, S_IWUSR, NULL, sdev_store_delete);
354 354
355static ssize_t 355static ssize_t
356store_state_field(struct device *dev, const char *buf, size_t count) 356store_state_field(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
357{ 357{
358 int i; 358 int i;
359 struct scsi_device *sdev = to_scsi_device(dev); 359 struct scsi_device *sdev = to_scsi_device(dev);
@@ -376,7 +376,7 @@ store_state_field(struct device *dev, const char *buf, size_t count)
376} 376}
377 377
378static ssize_t 378static ssize_t
379show_state_field(struct device *dev, char *buf) 379show_state_field(struct device *dev, struct device_attribute *attr, char *buf)
380{ 380{
381 struct scsi_device *sdev = to_scsi_device(dev); 381 struct scsi_device *sdev = to_scsi_device(dev);
382 const char *name = scsi_device_state_name(sdev->sdev_state); 382 const char *name = scsi_device_state_name(sdev->sdev_state);
@@ -390,7 +390,7 @@ show_state_field(struct device *dev, char *buf)
390static DEVICE_ATTR(state, S_IRUGO | S_IWUSR, show_state_field, store_state_field); 390static DEVICE_ATTR(state, S_IRUGO | S_IWUSR, show_state_field, store_state_field);
391 391
392static ssize_t 392static ssize_t
393show_queue_type_field(struct device *dev, char *buf) 393show_queue_type_field(struct device *dev, struct device_attribute *attr, char *buf)
394{ 394{
395 struct scsi_device *sdev = to_scsi_device(dev); 395 struct scsi_device *sdev = to_scsi_device(dev);
396 const char *name = "none"; 396 const char *name = "none";
@@ -406,7 +406,7 @@ show_queue_type_field(struct device *dev, char *buf)
406static DEVICE_ATTR(queue_type, S_IRUGO, show_queue_type_field, NULL); 406static DEVICE_ATTR(queue_type, S_IRUGO, show_queue_type_field, NULL);
407 407
408static ssize_t 408static ssize_t
409show_iostat_counterbits(struct device *dev, char *buf) 409show_iostat_counterbits(struct device *dev, struct device_attribute *attr, char *buf)
410{ 410{
411 return snprintf(buf, 20, "%d\n", (int)sizeof(atomic_t) * 8); 411 return snprintf(buf, 20, "%d\n", (int)sizeof(atomic_t) * 8);
412} 412}
@@ -415,7 +415,7 @@ static DEVICE_ATTR(iocounterbits, S_IRUGO, show_iostat_counterbits, NULL);
415 415
416#define show_sdev_iostat(field) \ 416#define show_sdev_iostat(field) \
417static ssize_t \ 417static ssize_t \
418show_iostat_##field(struct device *dev, char *buf) \ 418show_iostat_##field(struct device *dev, struct device_attribute *attr, char *buf) \
419{ \ 419{ \
420 struct scsi_device *sdev = to_scsi_device(dev); \ 420 struct scsi_device *sdev = to_scsi_device(dev); \
421 unsigned long long count = atomic_read(&sdev->field); \ 421 unsigned long long count = atomic_read(&sdev->field); \
@@ -449,7 +449,7 @@ static struct device_attribute *scsi_sysfs_sdev_attrs[] = {
449 NULL 449 NULL
450}; 450};
451 451
452static ssize_t sdev_store_queue_depth_rw(struct device *dev, const char *buf, 452static ssize_t sdev_store_queue_depth_rw(struct device *dev, struct device_attribute *attr, const char *buf,
453 size_t count) 453 size_t count)
454{ 454{
455 int depth, retval; 455 int depth, retval;
@@ -475,7 +475,7 @@ static struct device_attribute sdev_attr_queue_depth_rw =
475 __ATTR(queue_depth, S_IRUGO | S_IWUSR, sdev_show_queue_depth, 475 __ATTR(queue_depth, S_IRUGO | S_IWUSR, sdev_show_queue_depth,
476 sdev_store_queue_depth_rw); 476 sdev_store_queue_depth_rw);
477 477
478static ssize_t sdev_store_queue_type_rw(struct device *dev, const char *buf, 478static ssize_t sdev_store_queue_type_rw(struct device *dev, struct device_attribute *attr, const char *buf,
479 size_t count) 479 size_t count)
480{ 480{
481 struct scsi_device *sdev = to_scsi_device(dev); 481 struct scsi_device *sdev = to_scsi_device(dev);