mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
fpga: region: Rename dev to parent for parent device
Rename variable "dev" to "parent" in cases where it represents the parent device. Signed-off-by: Russ Weight <russell.h.weight@intel.com> Reviewed-by: Xu Yilun <yilun.xu@intel.com> Signed-off-by: Moritz Fischer <mdf@kernel.org> Link: https://lore.kernel.org/r/20210614170909.232415-6-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ceb8ab3c07
commit
5e77886d0a
1 changed files with 8 additions and 8 deletions
|
@ -181,7 +181,7 @@ ATTRIBUTE_GROUPS(fpga_region);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fpga_region_create - alloc and init a struct fpga_region
|
* fpga_region_create - alloc and init a struct fpga_region
|
||||||
* @dev: device parent
|
* @parent: device parent
|
||||||
* @mgr: manager that programs this region
|
* @mgr: manager that programs this region
|
||||||
* @get_bridges: optional function to get bridges to a list
|
* @get_bridges: optional function to get bridges to a list
|
||||||
*
|
*
|
||||||
|
@ -192,7 +192,7 @@ ATTRIBUTE_GROUPS(fpga_region);
|
||||||
* Return: struct fpga_region or NULL
|
* Return: struct fpga_region or NULL
|
||||||
*/
|
*/
|
||||||
struct fpga_region
|
struct fpga_region
|
||||||
*fpga_region_create(struct device *dev,
|
*fpga_region_create(struct device *parent,
|
||||||
struct fpga_manager *mgr,
|
struct fpga_manager *mgr,
|
||||||
int (*get_bridges)(struct fpga_region *))
|
int (*get_bridges)(struct fpga_region *))
|
||||||
{
|
{
|
||||||
|
@ -214,8 +214,8 @@ struct fpga_region
|
||||||
|
|
||||||
device_initialize(®ion->dev);
|
device_initialize(®ion->dev);
|
||||||
region->dev.class = fpga_region_class;
|
region->dev.class = fpga_region_class;
|
||||||
region->dev.parent = dev;
|
region->dev.parent = parent;
|
||||||
region->dev.of_node = dev->of_node;
|
region->dev.of_node = parent->of_node;
|
||||||
region->dev.id = id;
|
region->dev.id = id;
|
||||||
|
|
||||||
ret = dev_set_name(®ion->dev, "region%d", id);
|
ret = dev_set_name(®ion->dev, "region%d", id);
|
||||||
|
@ -253,7 +253,7 @@ static void devm_fpga_region_release(struct device *dev, void *res)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* devm_fpga_region_create - create and initialize a managed FPGA region struct
|
* devm_fpga_region_create - create and initialize a managed FPGA region struct
|
||||||
* @dev: device parent
|
* @parent: device parent
|
||||||
* @mgr: manager that programs this region
|
* @mgr: manager that programs this region
|
||||||
* @get_bridges: optional function to get bridges to a list
|
* @get_bridges: optional function to get bridges to a list
|
||||||
*
|
*
|
||||||
|
@ -268,7 +268,7 @@ static void devm_fpga_region_release(struct device *dev, void *res)
|
||||||
* Return: struct fpga_region or NULL
|
* Return: struct fpga_region or NULL
|
||||||
*/
|
*/
|
||||||
struct fpga_region
|
struct fpga_region
|
||||||
*devm_fpga_region_create(struct device *dev,
|
*devm_fpga_region_create(struct device *parent,
|
||||||
struct fpga_manager *mgr,
|
struct fpga_manager *mgr,
|
||||||
int (*get_bridges)(struct fpga_region *))
|
int (*get_bridges)(struct fpga_region *))
|
||||||
{
|
{
|
||||||
|
@ -278,12 +278,12 @@ struct fpga_region
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
region = fpga_region_create(dev, mgr, get_bridges);
|
region = fpga_region_create(parent, mgr, get_bridges);
|
||||||
if (!region) {
|
if (!region) {
|
||||||
devres_free(ptr);
|
devres_free(ptr);
|
||||||
} else {
|
} else {
|
||||||
*ptr = region;
|
*ptr = region;
|
||||||
devres_add(dev, ptr);
|
devres_add(parent, ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return region;
|
return region;
|
||||||
|
|
Loading…
Add table
Reference in a new issue