mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Merge generic_lookup_helpers into usb-next
The lookup helpers are needed here. Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
commit
c5c0283a9d
48 changed files with 341 additions and 383 deletions
|
|
@ -87,16 +87,6 @@ static struct regmap_config altr_sysmgr_regmap_cfg = {
|
|||
.use_single_write = true,
|
||||
};
|
||||
|
||||
/**
|
||||
* sysmgr_match_phandle
|
||||
* Matching function used by driver_find_device().
|
||||
* Return: True if match is found, otherwise false.
|
||||
*/
|
||||
static int sysmgr_match_phandle(struct device *dev, const void *data)
|
||||
{
|
||||
return dev->of_node == (const struct device_node *)data;
|
||||
}
|
||||
|
||||
/**
|
||||
* altr_sysmgr_regmap_lookup_by_phandle
|
||||
* Find the sysmgr previous configured in probe() and return regmap property.
|
||||
|
|
@ -117,8 +107,8 @@ struct regmap *altr_sysmgr_regmap_lookup_by_phandle(struct device_node *np,
|
|||
if (!sysmgr_np)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
dev = driver_find_device(&altr_sysmgr_driver.driver, NULL,
|
||||
(void *)sysmgr_np, sysmgr_match_phandle);
|
||||
dev = driver_find_device_by_of_node(&altr_sysmgr_driver.driver,
|
||||
(void *)sysmgr_np);
|
||||
of_node_put(sysmgr_np);
|
||||
if (!dev)
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
|
|
|
|||
Loading…
Reference in a new issue