Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288844
b: refs/heads/master
c: f3ff924
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Jan 25, 2012
1 parent efeeb69 commit fac4dd0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f30ea950edfaefa51221dd26a065b3442599778
refs/heads/master: f3ff9247088a0af0c192a28908dab76ff3d8871f
6 changes: 1 addition & 5 deletions trunk/drivers/net/phy/phy_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,9 +915,7 @@ static int phy_probe(struct device *dev)

phydev = to_phy_device(dev);

/* Make sure the driver is held.
* XXX -- Is this correct? */
drv = get_driver(phydev->dev.driver);
drv = phydev->dev.driver;
phydrv = to_phy_driver(drv);
phydev->drv = phydrv;

Expand Down Expand Up @@ -957,8 +955,6 @@ static int phy_remove(struct device *dev)

if (phydev->drv->remove)
phydev->drv->remove(phydev);

put_driver(dev->driver);
phydev->drv = NULL;

return 0;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/pci/xen-pcifront.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ static pci_ers_result_t pcifront_common_process(int cmd,
}
pdrv = pcidev->driver;

if (get_driver(&pdrv->driver)) {
if (pdrv->driver) {
if (pdrv->err_handler && pdrv->err_handler->error_detected) {
dev_dbg(&pcidev->dev,
"trying to call AER service\n");
Expand Down Expand Up @@ -623,7 +623,6 @@ static pci_ers_result_t pcifront_common_process(int cmd,
}
}
}
put_driver(&pdrv->driver);
}
if (!flag)
result = PCI_ERS_RESULT_NONE;
Expand Down
20 changes: 2 additions & 18 deletions trunk/drivers/ssb/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,6 @@ static void ssb_device_put(struct ssb_device *dev)
put_device(dev->dev);
}

static inline struct ssb_driver *ssb_driver_get(struct ssb_driver *drv)
{
if (drv)
get_driver(&drv->drv);
return drv;
}

static inline void ssb_driver_put(struct ssb_driver *drv)
{
if (drv)
put_driver(&drv->drv);
}

static int ssb_device_resume(struct device *dev)
{
struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
Expand Down Expand Up @@ -250,11 +237,9 @@ int ssb_devices_freeze(struct ssb_bus *bus, struct ssb_freeze_context *ctx)
ssb_device_put(sdev);
continue;
}
sdrv = ssb_driver_get(drv_to_ssb_drv(sdev->dev->driver));
if (!sdrv || SSB_WARN_ON(!sdrv->remove)) {
ssb_device_put(sdev);
sdrv = drv_to_ssb_drv(sdev->dev->driver);
if (SSB_WARN_ON(!sdrv->remove))
continue;
}
sdrv->remove(sdev);
ctx->device_frozen[i] = 1;
}
Expand Down Expand Up @@ -293,7 +278,6 @@ int ssb_devices_thaw(struct ssb_freeze_context *ctx)
dev_name(sdev->dev));
result = err;
}
ssb_driver_put(sdrv);
ssb_device_put(sdev);
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/lib/dma-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static bool driver_filter(struct device *dev)
return false;

/* driver filter on but not yet initialized */
drv = get_driver(dev->driver);
drv = dev->driver;
if (!drv)
return false;

Expand All @@ -185,7 +185,6 @@ static bool driver_filter(struct device *dev)
}

read_unlock_irqrestore(&driver_name_lock, flags);
put_driver(drv);

return ret;
}
Expand Down

0 comments on commit fac4dd0

Please sign in to comment.