Loading drivers/amba/bus.c +0 −61 Original line number Diff line number Diff line Loading @@ -669,66 +669,6 @@ void amba_device_unregister(struct amba_device *dev) device_unregister(&dev->dev); } struct find_data { struct amba_device *dev; struct device *parent; const char *busid; unsigned int id; unsigned int mask; }; static int amba_find_match(struct device *dev, void *data) { struct find_data *d = data; struct amba_device *pcdev = to_amba_device(dev); int r; r = (pcdev->periphid & d->mask) == d->id; if (d->parent) r &= d->parent == dev->parent; if (d->busid) r &= strcmp(dev_name(dev), d->busid) == 0; if (r) { get_device(dev); d->dev = pcdev; } return r; } /** * amba_find_device - locate an AMBA device given a bus id * @busid: bus id for device (or NULL) * @parent: parent device (or NULL) * @id: peripheral ID (or 0) * @mask: peripheral ID mask (or 0) * * Return the AMBA device corresponding to the supplied parameters. * If no device matches, returns NULL. * * NOTE: When a valid device is found, its refcount is * incremented, and must be decremented before the returned * reference. */ struct amba_device * amba_find_device(const char *busid, struct device *parent, unsigned int id, unsigned int mask) { struct find_data data; data.dev = NULL; data.parent = parent; data.busid = busid; data.id = id; data.mask = mask; bus_for_each_dev(&amba_bustype, NULL, &data, amba_find_match); return data.dev; } /** * amba_request_regions - request all mem regions associated with device * @dev: amba_device structure for device Loading Loading @@ -768,6 +708,5 @@ EXPORT_SYMBOL(amba_driver_register); EXPORT_SYMBOL(amba_driver_unregister); EXPORT_SYMBOL(amba_device_register); EXPORT_SYMBOL(amba_device_unregister); EXPORT_SYMBOL(amba_find_device); EXPORT_SYMBOL(amba_request_regions); EXPORT_SYMBOL(amba_release_regions); include/linux/amba/bus.h +0 −1 Original line number Diff line number Diff line Loading @@ -117,7 +117,6 @@ void amba_device_put(struct amba_device *); int amba_device_add(struct amba_device *, struct resource *); int amba_device_register(struct amba_device *, struct resource *); void amba_device_unregister(struct amba_device *); struct amba_device *amba_find_device(const char *, struct device *, unsigned int, unsigned int); int amba_request_regions(struct amba_device *, const char *); void amba_release_regions(struct amba_device *); Loading Loading
drivers/amba/bus.c +0 −61 Original line number Diff line number Diff line Loading @@ -669,66 +669,6 @@ void amba_device_unregister(struct amba_device *dev) device_unregister(&dev->dev); } struct find_data { struct amba_device *dev; struct device *parent; const char *busid; unsigned int id; unsigned int mask; }; static int amba_find_match(struct device *dev, void *data) { struct find_data *d = data; struct amba_device *pcdev = to_amba_device(dev); int r; r = (pcdev->periphid & d->mask) == d->id; if (d->parent) r &= d->parent == dev->parent; if (d->busid) r &= strcmp(dev_name(dev), d->busid) == 0; if (r) { get_device(dev); d->dev = pcdev; } return r; } /** * amba_find_device - locate an AMBA device given a bus id * @busid: bus id for device (or NULL) * @parent: parent device (or NULL) * @id: peripheral ID (or 0) * @mask: peripheral ID mask (or 0) * * Return the AMBA device corresponding to the supplied parameters. * If no device matches, returns NULL. * * NOTE: When a valid device is found, its refcount is * incremented, and must be decremented before the returned * reference. */ struct amba_device * amba_find_device(const char *busid, struct device *parent, unsigned int id, unsigned int mask) { struct find_data data; data.dev = NULL; data.parent = parent; data.busid = busid; data.id = id; data.mask = mask; bus_for_each_dev(&amba_bustype, NULL, &data, amba_find_match); return data.dev; } /** * amba_request_regions - request all mem regions associated with device * @dev: amba_device structure for device Loading Loading @@ -768,6 +708,5 @@ EXPORT_SYMBOL(amba_driver_register); EXPORT_SYMBOL(amba_driver_unregister); EXPORT_SYMBOL(amba_device_register); EXPORT_SYMBOL(amba_device_unregister); EXPORT_SYMBOL(amba_find_device); EXPORT_SYMBOL(amba_request_regions); EXPORT_SYMBOL(amba_release_regions);
include/linux/amba/bus.h +0 −1 Original line number Diff line number Diff line Loading @@ -117,7 +117,6 @@ void amba_device_put(struct amba_device *); int amba_device_add(struct amba_device *, struct resource *); int amba_device_register(struct amba_device *, struct resource *); void amba_device_unregister(struct amba_device *); struct amba_device *amba_find_device(const char *, struct device *, unsigned int, unsigned int); int amba_request_regions(struct amba_device *, const char *); void amba_release_regions(struct amba_device *); Loading