aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-05-04 15:40:54 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:30:27 -0400
commit559fde706873256903155b3a62b05d0f52d62ab9 (patch)
tree4b242199a684e8ca8fadad29b8960a1567d441e2 /drivers/scsi/ibmvscsi
parent317ccc4246bf205807c4d2f270d7fc8f024a9dc3 (diff)
ibmvscsi: gadget: at91_udc: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Cc: linux-scsi@vger.kernel.org Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Brian King <brking@linux.vnet.ibm.com> Cc: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/scsi/ibmvscsi')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvscsi.c6
-rw-r--r--drivers/scsi/ibmvscsi/ibmvstgt.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 11d2602ae88e..869a11bdccbd 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -1877,7 +1877,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
1877 unsigned long wait_switch = 0; 1877 unsigned long wait_switch = 0;
1878 int rc; 1878 int rc;
1879 1879
1880 vdev->dev.driver_data = NULL; 1880 dev_set_drvdata(&vdev->dev, NULL);
1881 1881
1882 host = scsi_host_alloc(&driver_template, sizeof(*hostdata)); 1882 host = scsi_host_alloc(&driver_template, sizeof(*hostdata));
1883 if (!host) { 1883 if (!host) {
@@ -1949,7 +1949,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
1949 scsi_scan_host(host); 1949 scsi_scan_host(host);
1950 } 1950 }
1951 1951
1952 vdev->dev.driver_data = hostdata; 1952 dev_set_drvdata(&vdev->dev, hostdata);
1953 return 0; 1953 return 0;
1954 1954
1955 add_srp_port_failed: 1955 add_srp_port_failed:
@@ -1968,7 +1968,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
1968 1968
1969static int ibmvscsi_remove(struct vio_dev *vdev) 1969static int ibmvscsi_remove(struct vio_dev *vdev)
1970{ 1970{
1971 struct ibmvscsi_host_data *hostdata = vdev->dev.driver_data; 1971 struct ibmvscsi_host_data *hostdata = dev_get_drvdata(&vdev->dev);
1972 unmap_persist_bufs(hostdata); 1972 unmap_persist_bufs(hostdata);
1973 release_event_pool(&hostdata->pool, hostdata); 1973 release_event_pool(&hostdata->pool, hostdata);
1974 ibmvscsi_ops->release_crq_queue(&hostdata->queue, hostdata, 1974 ibmvscsi_ops->release_crq_queue(&hostdata->queue, hostdata,
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c
index e2dd6a45924a..d5eaf9727109 100644
--- a/drivers/scsi/ibmvscsi/ibmvstgt.c
+++ b/drivers/scsi/ibmvscsi/ibmvstgt.c
@@ -892,7 +892,7 @@ free_vport:
892 892
893static int ibmvstgt_remove(struct vio_dev *dev) 893static int ibmvstgt_remove(struct vio_dev *dev)
894{ 894{
895 struct srp_target *target = (struct srp_target *) dev->dev.driver_data; 895 struct srp_target *target = dev_get_drvdata(&dev->dev);
896 struct Scsi_Host *shost = target->shost; 896 struct Scsi_Host *shost = target->shost;
897 struct vio_port *vport = target->ldata; 897 struct vio_port *vport = target->ldata;
898 898