[PATCH 3/3] *rest*: Replace driver_data with dev_[gs]et_drvdata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Richard Knutsson <[email protected]>

Replace (found) dev->driver_data with dev_[gs]et_drvdata().

Signed-off-by: Richard Knutsson <[email protected]>

---

ide/ide.c      |    4 ++--
scsi/aha1740.c |    2 +-
usb/core/usb.c |    6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)

diff -Narup a/drivers/ide/ide.c b/drivers/ide/ide.c
--- a/drivers/ide/ide.c	2005-12-02 14:46:04.000000000 +0100
+++ b/drivers/ide/ide.c	2005-12-02 14:48:47.000000000 +0100
@@ -1216,7 +1216,7 @@ EXPORT_SYMBOL(system_bus_clock);

static int generic_ide_suspend(struct device *dev, pm_message_t state)
{
-	ide_drive_t *drive = dev->driver_data;
+	ide_drive_t *drive = dev_get_drvdata(dev);
	struct request rq;
	struct request_pm_state rqpm;
	ide_task_t args;
@@ -1235,7 +1235,7 @@ static int generic_ide_suspend(struct de

static int generic_ide_resume(struct device *dev)
{
-	ide_drive_t *drive = dev->driver_data;
+	ide_drive_t *drive = dev_get_drvdata(dev);
	struct request rq;
	struct request_pm_state rqpm;
	ide_task_t args;
diff -Narup a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c
--- a/drivers/scsi/aha1740.c	2005-12-02 15:05:35.000000000 +0100
+++ b/drivers/scsi/aha1740.c	2005-12-02 15:06:48.000000000 +0100
@@ -659,7 +659,7 @@ static int aha1740_probe (struct device
static __devexit int aha1740_remove (struct device *dev)
{
-	struct Scsi_Host *shpnt = dev->driver_data;
+	struct Scsi_Host *shpnt = dev_get_drvdata(dev);
	struct aha1740_hostdata *host = HOSTDATA (shpnt);

	scsi_remove_host(shpnt);
diff -Narup a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
--- a/drivers/usb/core/usb.c	2005-12-02 14:26:11.000000000 +0100
+++ b/drivers/usb/core/usb.c	2005-12-02 14:30:14.000000000 +0100
@@ -574,7 +574,7 @@ static int usb_hotplug (struct device *d

	/* Must check driver_data here, as on remove driver is always NULL */
if ((dev->driver == &usb_generic_driver) || - (dev->driver_data == &usb_generic_driver_data))
+	    (dev_get_drvdata(dev) == &usb_generic_driver_data))
		return 0;

	intf = to_usb_interface(dev);
@@ -1414,7 +1414,7 @@ static int usb_generic_suspend(struct de
	}

	if ((dev->driver == NULL) ||
-	    (dev->driver_data == &usb_generic_driver_data))
+	    (dev_get_drvdata(dev) == &usb_generic_driver_data))
		return 0;

	intf = to_usb_interface(dev);
@@ -1460,7 +1460,7 @@ static int usb_generic_resume(struct dev
	}

	if ((dev->driver == NULL) ||
-	    (dev->driver_data == &usb_generic_driver_data))
+	    (dev_get_drvdata(dev) == &usb_generic_driver_data))
		return 0;

	intf = to_usb_interface(dev);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux