diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-04-29 21:59:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-05-06 09:51:54 +0200 |
commit | 38ea74eb8fc1b82b39e13a6527095a0036539117 (patch) | |
tree | e074f81d7fa46a4adfb3dfcc5575fbb1eb85f9da /drivers/rpmsg | |
parent | bb17d110cbf270d5247a6e261c5ad50e362d1675 (diff) |
rpmsg: use local 'dev' variable
'&rpdev->dev' is already cached as local variable, so use it to simplify
the code.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220429195946.1061725-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r-- | drivers/rpmsg/rpmsg_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index 4938fc4eff00..290c1f02da10 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -606,10 +606,10 @@ int rpmsg_register_device_override(struct rpmsg_device *rpdev, if (driver_override) strcpy(rpdev->id.name, driver_override); - dev_set_name(&rpdev->dev, "%s.%s.%d.%d", dev_name(dev->parent), + dev_set_name(dev, "%s.%s.%d.%d", dev_name(dev->parent), rpdev->id.name, rpdev->src, rpdev->dst); - rpdev->dev.bus = &rpmsg_bus; + dev->bus = &rpmsg_bus; device_initialize(dev); if (driver_override) { @@ -627,7 +627,7 @@ int rpmsg_register_device_override(struct rpmsg_device *rpdev, dev_err(dev, "device_add failed: %d\n", ret); kfree(rpdev->driver_override); rpdev->driver_override = NULL; - put_device(&rpdev->dev); + put_device(dev); } return ret; |