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>
This commit is contained in:
parent
317ccc4246
commit
559fde7068
2 changed files with 4 additions and 4 deletions
|
@ -1877,7 +1877,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
|||
unsigned long wait_switch = 0;
|
||||
int rc;
|
||||
|
||||
vdev->dev.driver_data = NULL;
|
||||
dev_set_drvdata(&vdev->dev, NULL);
|
||||
|
||||
host = scsi_host_alloc(&driver_template, sizeof(*hostdata));
|
||||
if (!host) {
|
||||
|
@ -1949,7 +1949,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
|||
scsi_scan_host(host);
|
||||
}
|
||||
|
||||
vdev->dev.driver_data = hostdata;
|
||||
dev_set_drvdata(&vdev->dev, hostdata);
|
||||
return 0;
|
||||
|
||||
add_srp_port_failed:
|
||||
|
@ -1968,7 +1968,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
|||
|
||||
static int ibmvscsi_remove(struct vio_dev *vdev)
|
||||
{
|
||||
struct ibmvscsi_host_data *hostdata = vdev->dev.driver_data;
|
||||
struct ibmvscsi_host_data *hostdata = dev_get_drvdata(&vdev->dev);
|
||||
unmap_persist_bufs(hostdata);
|
||||
release_event_pool(&hostdata->pool, hostdata);
|
||||
ibmvscsi_ops->release_crq_queue(&hostdata->queue, hostdata,
|
||||
|
|
|
@ -892,7 +892,7 @@ static int ibmvstgt_probe(struct vio_dev *dev, const struct vio_device_id *id)
|
|||
|
||||
static int ibmvstgt_remove(struct vio_dev *dev)
|
||||
{
|
||||
struct srp_target *target = (struct srp_target *) dev->dev.driver_data;
|
||||
struct srp_target *target = dev_get_drvdata(&dev->dev);
|
||||
struct Scsi_Host *shost = target->shost;
|
||||
struct vio_port *vport = target->ldata;
|
||||
|
||||
|
|
Loading…
Reference in a new issue