diff options
author | Tony Jones <tonyj@suse.de> | 2008-02-21 18:13:36 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-19 22:10:33 -0400 |
commit | ee959b00c335d7780136c5abda37809191fe52c3 (patch) | |
tree | 7775f3b274fd8caf5e7e5154fea89e96f2babd94 /drivers/scsi/ibmvscsi/ibmvscsi.c | |
parent | 56d110e852b0b1c85ad6c9bfe1cb4473ceb16402 (diff) |
SCSI: convert struct class_device to struct device
It's big, but there doesn't seem to be a way to split it up smaller...
Signed-off-by: Tony Jones <tonyj@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvscsi.c')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvscsi.c | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 78d46a900bb5..4a922c57125e 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
@@ -1456,9 +1456,10 @@ static int ibmvscsi_change_queue_depth(struct scsi_device *sdev, int qdepth) | |||
1456 | /* ------------------------------------------------------------ | 1456 | /* ------------------------------------------------------------ |
1457 | * sysfs attributes | 1457 | * sysfs attributes |
1458 | */ | 1458 | */ |
1459 | static ssize_t show_host_srp_version(struct class_device *class_dev, char *buf) | 1459 | static ssize_t show_host_srp_version(struct device *dev, |
1460 | struct device_attribute *attr, char *buf) | ||
1460 | { | 1461 | { |
1461 | struct Scsi_Host *shost = class_to_shost(class_dev); | 1462 | struct Scsi_Host *shost = class_to_shost(dev); |
1462 | struct ibmvscsi_host_data *hostdata = shost_priv(shost); | 1463 | struct ibmvscsi_host_data *hostdata = shost_priv(shost); |
1463 | int len; | 1464 | int len; |
1464 | 1465 | ||
@@ -1467,7 +1468,7 @@ static ssize_t show_host_srp_version(struct class_device *class_dev, char *buf) | |||
1467 | return len; | 1468 | return len; |
1468 | } | 1469 | } |
1469 | 1470 | ||
1470 | static struct class_device_attribute ibmvscsi_host_srp_version = { | 1471 | static struct device_attribute ibmvscsi_host_srp_version = { |
1471 | .attr = { | 1472 | .attr = { |
1472 | .name = "srp_version", | 1473 | .name = "srp_version", |
1473 | .mode = S_IRUGO, | 1474 | .mode = S_IRUGO, |
@@ -1475,10 +1476,11 @@ static struct class_device_attribute ibmvscsi_host_srp_version = { | |||
1475 | .show = show_host_srp_version, | 1476 | .show = show_host_srp_version, |
1476 | }; | 1477 | }; |
1477 | 1478 | ||
1478 | static ssize_t show_host_partition_name(struct class_device *class_dev, | 1479 | static ssize_t show_host_partition_name(struct device *dev, |
1480 | struct device_attribute *attr, | ||
1479 | char *buf) | 1481 | char *buf) |
1480 | { | 1482 | { |
1481 | struct Scsi_Host *shost = class_to_shost(class_dev); | 1483 | struct Scsi_Host *shost = class_to_shost(dev); |
1482 | struct ibmvscsi_host_data *hostdata = shost_priv(shost); | 1484 | struct ibmvscsi_host_data *hostdata = shost_priv(shost); |
1483 | int len; | 1485 | int len; |
1484 | 1486 | ||
@@ -1487,7 +1489,7 @@ static ssize_t show_host_partition_name(struct class_device *class_dev, | |||
1487 | return len; | 1489 | return len; |
1488 | } | 1490 | } |
1489 | 1491 | ||
1490 | static struct class_device_attribute ibmvscsi_host_partition_name = { | 1492 | static struct device_attribute ibmvscsi_host_partition_name = { |
1491 | .attr = { | 1493 | .attr = { |
1492 | .name = "partition_name", | 1494 | .name = "partition_name", |
1493 | .mode = S_IRUGO, | 1495 | .mode = S_IRUGO, |
@@ -1495,10 +1497,11 @@ static struct class_device_attribute ibmvscsi_host_partition_name = { | |||
1495 | .show = show_host_partition_name, | 1497 | .show = show_host_partition_name, |
1496 | }; | 1498 | }; |
1497 | 1499 | ||
1498 | static ssize_t show_host_partition_number(struct class_device *class_dev, | 1500 | static ssize_t show_host_partition_number(struct device *dev, |
1501 | struct device_attribute *attr, | ||
1499 | char *buf) | 1502 | char *buf) |
1500 | { | 1503 | { |
1501 | struct Scsi_Host *shost = class_to_shost(class_dev); | 1504 | struct Scsi_Host *shost = class_to_shost(dev); |
1502 | struct ibmvscsi_host_data *hostdata = shost_priv(shost); | 1505 | struct ibmvscsi_host_data *hostdata = shost_priv(shost); |
1503 | int len; | 1506 | int len; |
1504 | 1507 | ||
@@ -1507,7 +1510,7 @@ static ssize_t show_host_partition_number(struct class_device *class_dev, | |||
1507 | return len; | 1510 | return len; |
1508 | } | 1511 | } |
1509 | 1512 | ||
1510 | static struct class_device_attribute ibmvscsi_host_partition_number = { | 1513 | static struct device_attribute ibmvscsi_host_partition_number = { |
1511 | .attr = { | 1514 | .attr = { |
1512 | .name = "partition_number", | 1515 | .name = "partition_number", |
1513 | .mode = S_IRUGO, | 1516 | .mode = S_IRUGO, |
@@ -1515,9 +1518,10 @@ static struct class_device_attribute ibmvscsi_host_partition_number = { | |||
1515 | .show = show_host_partition_number, | 1518 | .show = show_host_partition_number, |
1516 | }; | 1519 | }; |
1517 | 1520 | ||
1518 | static ssize_t show_host_mad_version(struct class_device *class_dev, char *buf) | 1521 | static ssize_t show_host_mad_version(struct device *dev, |
1522 | struct device_attribute *attr, char *buf) | ||
1519 | { | 1523 | { |
1520 | struct Scsi_Host *shost = class_to_shost(class_dev); | 1524 | struct Scsi_Host *shost = class_to_shost(dev); |
1521 | struct ibmvscsi_host_data *hostdata = shost_priv(shost); | 1525 | struct ibmvscsi_host_data *hostdata = shost_priv(shost); |
1522 | int len; | 1526 | int len; |
1523 | 1527 | ||
@@ -1526,7 +1530,7 @@ static ssize_t show_host_mad_version(struct class_device *class_dev, char *buf) | |||
1526 | return len; | 1530 | return len; |
1527 | } | 1531 | } |
1528 | 1532 | ||
1529 | static struct class_device_attribute ibmvscsi_host_mad_version = { | 1533 | static struct device_attribute ibmvscsi_host_mad_version = { |
1530 | .attr = { | 1534 | .attr = { |
1531 | .name = "mad_version", | 1535 | .name = "mad_version", |
1532 | .mode = S_IRUGO, | 1536 | .mode = S_IRUGO, |
@@ -1534,9 +1538,10 @@ static struct class_device_attribute ibmvscsi_host_mad_version = { | |||
1534 | .show = show_host_mad_version, | 1538 | .show = show_host_mad_version, |
1535 | }; | 1539 | }; |
1536 | 1540 | ||
1537 | static ssize_t show_host_os_type(struct class_device *class_dev, char *buf) | 1541 | static ssize_t show_host_os_type(struct device *dev, |
1542 | struct device_attribute *attr, char *buf) | ||
1538 | { | 1543 | { |
1539 | struct Scsi_Host *shost = class_to_shost(class_dev); | 1544 | struct Scsi_Host *shost = class_to_shost(dev); |
1540 | struct ibmvscsi_host_data *hostdata = shost_priv(shost); | 1545 | struct ibmvscsi_host_data *hostdata = shost_priv(shost); |
1541 | int len; | 1546 | int len; |
1542 | 1547 | ||
@@ -1544,7 +1549,7 @@ static ssize_t show_host_os_type(struct class_device *class_dev, char *buf) | |||
1544 | return len; | 1549 | return len; |
1545 | } | 1550 | } |
1546 | 1551 | ||
1547 | static struct class_device_attribute ibmvscsi_host_os_type = { | 1552 | static struct device_attribute ibmvscsi_host_os_type = { |
1548 | .attr = { | 1553 | .attr = { |
1549 | .name = "os_type", | 1554 | .name = "os_type", |
1550 | .mode = S_IRUGO, | 1555 | .mode = S_IRUGO, |
@@ -1552,9 +1557,10 @@ static struct class_device_attribute ibmvscsi_host_os_type = { | |||
1552 | .show = show_host_os_type, | 1557 | .show = show_host_os_type, |
1553 | }; | 1558 | }; |
1554 | 1559 | ||
1555 | static ssize_t show_host_config(struct class_device *class_dev, char *buf) | 1560 | static ssize_t show_host_config(struct device *dev, |
1561 | struct device_attribute *attr, char *buf) | ||
1556 | { | 1562 | { |
1557 | struct Scsi_Host *shost = class_to_shost(class_dev); | 1563 | struct Scsi_Host *shost = class_to_shost(dev); |
1558 | struct ibmvscsi_host_data *hostdata = shost_priv(shost); | 1564 | struct ibmvscsi_host_data *hostdata = shost_priv(shost); |
1559 | 1565 | ||
1560 | /* returns null-terminated host config data */ | 1566 | /* returns null-terminated host config data */ |
@@ -1564,7 +1570,7 @@ static ssize_t show_host_config(struct class_device *class_dev, char *buf) | |||
1564 | return 0; | 1570 | return 0; |
1565 | } | 1571 | } |
1566 | 1572 | ||
1567 | static struct class_device_attribute ibmvscsi_host_config = { | 1573 | static struct device_attribute ibmvscsi_host_config = { |
1568 | .attr = { | 1574 | .attr = { |
1569 | .name = "config", | 1575 | .name = "config", |
1570 | .mode = S_IRUGO, | 1576 | .mode = S_IRUGO, |
@@ -1572,7 +1578,7 @@ static struct class_device_attribute ibmvscsi_host_config = { | |||
1572 | .show = show_host_config, | 1578 | .show = show_host_config, |
1573 | }; | 1579 | }; |
1574 | 1580 | ||
1575 | static struct class_device_attribute *ibmvscsi_attrs[] = { | 1581 | static struct device_attribute *ibmvscsi_attrs[] = { |
1576 | &ibmvscsi_host_srp_version, | 1582 | &ibmvscsi_host_srp_version, |
1577 | &ibmvscsi_host_partition_name, | 1583 | &ibmvscsi_host_partition_name, |
1578 | &ibmvscsi_host_partition_number, | 1584 | &ibmvscsi_host_partition_number, |