diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:49:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:49:58 -0400 |
commit | e80ab411e589e00550e2e6e5a6a02d59cc730357 (patch) | |
tree | 870225ff7b5b8d03e82a996963213a4bb9cce248 /drivers/scsi/ibmvscsi/ibmvscsi.c | |
parent | 529a41e36673b518c9e091f3a8d932b6b9e3c461 (diff) | |
parent | ee959b00c335d7780136c5abda37809191fe52c3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
SCSI: convert struct class_device to struct device
DRM: remove unused dev_class
IB: rename "dev" to "srp_dev" in srp_host structure
IB: convert struct class_device to struct device
memstick: convert struct class_device to struct device
driver core: replace remaining __FUNCTION__ occurrences
sysfs: refill attribute buffer when reading from offset 0
PM: Remove destroy_suspended_device()
Firmware: add iSCSI iBFT Support
PM: Remove legacy PM (fix)
Kobject: Replace list_for_each() with list_for_each_entry().
SYSFS: Explicitly include required header file slab.h.
Driver core: make device_is_registered() work for class devices
PM: Convert wakeup flag accessors to inline functions
PM: Make wakeup flags available whenever CONFIG_PM is set
PM: Fix misuse of wakeup flag accessors in serial core
Driver core: Call device_pm_add() after bus_add_device() in device_add()
PM: Handle device registrations during suspend/resume
block: send disk "change" event for rescan_partitions()
sysdev: detect multiple driver registrations
...
Fixed trivial conflict in include/linux/memory.h due to semaphore header
file change (made irrelevant by the change to mutex).
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, |