* [PATCH v2][next] backlight: sky81452-backlight: Remove unnecessary call to of_node_get
@ 2024-04-21 10:49 Shresth Prasad
2024-04-22 8:54 ` Daniel Thompson
0 siblings, 1 reply; 3+ messages in thread
From: Shresth Prasad @ 2024-04-21 10:49 UTC (permalink / raw)
To: lee, daniel.thompson, jingoohan1, deller
Cc: dri-devel, linux-fbdev, linux-kernel, skhan, javier.carrasco.cruz,
Shresth Prasad
`dev->of_node` already has a reference to the device_node and calling
of_node_get on it is unnecessary. All conresponding calls to
of_node_put are also removed.
Signed-off-by: Shresth Prasad <shresthprasad7@gmail.com>
---
Changes in v2:
- Change commit header and body to better reflect changes
- Remove call to of_node_get entirely
drivers/video/backlight/sky81452-backlight.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/video/backlight/sky81452-backlight.c b/drivers/video/backlight/sky81452-backlight.c
index eb18c6eb0ff0..e7cae32c8d96 100644
--- a/drivers/video/backlight/sky81452-backlight.c
+++ b/drivers/video/backlight/sky81452-backlight.c
@@ -182,7 +182,7 @@ static const struct attribute_group sky81452_bl_attr_group = {
static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
struct device *dev)
{
- struct device_node *np = of_node_get(dev->of_node);
+ struct device_node *np = dev->of_node;
struct sky81452_bl_platform_data *pdata;
int num_entry;
unsigned int sources[6];
@@ -195,7 +195,6 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
- of_node_put(np);
return ERR_PTR(-ENOMEM);
}
@@ -217,7 +216,6 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
num_entry);
if (ret < 0) {
dev_err(dev, "led-sources node is invalid.\n");
- of_node_put(np);
return ERR_PTR(-EINVAL);
}
@@ -237,7 +235,6 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
if (ret < 0)
pdata->boost_current_limit = 2750;
- of_node_put(np);
return pdata;
}
#else
--
2.44.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2][next] backlight: sky81452-backlight: Remove unnecessary call to of_node_get
2024-04-21 10:49 [PATCH v2][next] backlight: sky81452-backlight: Remove unnecessary call to of_node_get Shresth Prasad
@ 2024-04-22 8:54 ` Daniel Thompson
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Thompson @ 2024-04-22 8:54 UTC (permalink / raw)
To: Shresth Prasad
Cc: lee, jingoohan1, deller, dri-devel, linux-fbdev, linux-kernel,
skhan, javier.carrasco.cruz
On Sun, Apr 21, 2024 at 04:19:17PM +0530, Shresth Prasad wrote:
> `dev->of_node` already has a reference to the device_node and calling
> of_node_get on it is unnecessary. All conresponding calls to
> of_node_put are also removed.
>
> Signed-off-by: Shresth Prasad <shresthprasad7@gmail.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Daniel.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2][next] backlight: sky81452-backlight: Remove unnecessary call to of_node_get
@ 2024-04-28 11:48 Shresth Prasad
0 siblings, 0 replies; 3+ messages in thread
From: Shresth Prasad @ 2024-04-28 11:48 UTC (permalink / raw)
To: Shresth Prasad
Cc: daniel.thompson, deller, dri-devel, Javier Carrasco, jingoohan1,
lee, linux-fbdev, linux-kernel, Shuah Khan
Hi, any updates on this?
Has this patch been accepted?
Regards,
Shresth
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-28 11:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-21 10:49 [PATCH v2][next] backlight: sky81452-backlight: Remove unnecessary call to of_node_get Shresth Prasad
2024-04-22 8:54 ` Daniel Thompson
-- strict thread matches above, loose matches on Subject: below --
2024-04-28 11:48 Shresth Prasad
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).