Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325167
b: refs/heads/master
c: 3bea7fc
h: refs/heads/master
i:
  325165: b2a1df5
  325163: e07542e
  325159: 382d471
  325151: ee40a1f
v: v3
  • Loading branch information
Jens Taprogge authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent 8206570 commit 5ae66a5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 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: 90cb61948fad898f7ac7452c68f2bec56b0e85f0
refs/heads/master: 3bea7fcb797eed256f461e14e1992f4e71932704
17 changes: 7 additions & 10 deletions trunk/drivers/staging/ipack/ipack.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,32 +59,29 @@ static int ipack_bus_match(struct device *dev, struct device_driver *drv)
const struct ipack_device_id *found_id;

found_id = ipack_match_id(idrv->id_table, idev);
if (found_id) {
idev->driver = idrv;
return 1;
}

return 0;
return found_id ? 1 : 0;
}

static int ipack_bus_probe(struct device *device)
{
struct ipack_device *dev = to_ipack_dev(device);
struct ipack_driver *drv = to_ipack_driver(device->driver);

if (!dev->driver->ops->probe)
if (!drv->ops->probe)
return -EINVAL;

return dev->driver->ops->probe(dev);
return drv->ops->probe(dev);
}

static int ipack_bus_remove(struct device *device)
{
struct ipack_device *dev = to_ipack_dev(device);
struct ipack_driver *drv = to_ipack_driver(device->driver);

if (!dev->driver->ops->remove)
if (!drv->ops->remove)
return -EINVAL;

dev->driver->ops->remove(dev);
drv->ops->remove(dev);
return 0;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/staging/ipack/ipack.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ struct ipack_addr_space {
* @bus_nr: IP bus number where the device is plugged
* @slot: Slot where the device is plugged in the carrier board
* @irq: IRQ vector
* @driver: Pointer to the ipack_driver that manages the device
* @bus: ipack_bus_device where the device is plugged to.
* @id_space: Virtual address to ID space.
* @io_space: Virtual address to IO space.
Expand All @@ -68,7 +67,6 @@ struct ipack_device {
unsigned int bus_nr;
unsigned int slot;
unsigned int irq;
struct ipack_driver *driver;
struct ipack_bus_device *bus;
struct ipack_addr_space id_space;
struct ipack_addr_space io_space;
Expand Down

0 comments on commit 5ae66a5

Please sign in to comment.