From e5110d011e03030926872457f05e49e3d5031737 Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Sat, 6 Jun 2009 18:35:27 +0200 Subject: firewire: add parent-of-unit accessor Retrieval of an fw_unit's parent is a common pattern in high-level code. Wrap it up as device = fw_parent_device(unit). Signed-off-by: Stefan Richter --- drivers/firewire/core-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/firewire/core-device.c') diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index 65d84dd6c1de..3f4e646367b7 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c @@ -93,7 +93,7 @@ static int fw_unit_match(struct device *dev, struct device_driver *drv) if (!is_fw_unit(dev)) return 0; - device = fw_device(unit->device.parent); + device = fw_parent_device(unit); id = container_of(drv, struct fw_driver, driver)->id_table; for (; id->match_flags != 0; id++) { @@ -114,7 +114,7 @@ static int fw_unit_match(struct device *dev, struct device_driver *drv) static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size) { - struct fw_device *device = fw_device(unit->device.parent); + struct fw_device *device = fw_parent_device(unit); struct fw_csr_iterator ci; int key, value; -- cgit v1.2.2