linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Richard Gong <richard.gong@linux.intel.com>,
	linux-kernel@vger.kernel.org
Cc: Sudeep Holla <sudeep.holla@arm.com>
Subject: [PATCH] firmware: stratix10-svc: Drop unnecessary checking for and populating /firmware/ node
Date: Tue, 21 Apr 2020 18:32:56 +0100	[thread overview]
Message-ID: <20200421173256.34897-1-sudeep.holla@arm.com> (raw)

Commit 3aa0582fdb82 ("of: platform: populate /firmware/ node from
of_platform_default_populate_init()") changed the core-code to generate
the platform devices, meaning there is no need for the driver to check
the firmware node and populate it again here.

Let us just drop the unnecessary extra check done here as the core takes
care of it.

Cc: Richard Gong <richard.gong@linux.intel.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/firmware/stratix10-svc.c | 17 -----------------
 1 file changed, 17 deletions(-)

Hi Richard,

I assume the subsys_initcall is essential here. If not we can remove the
whole initcalls and replace it with module_platform_driver(). Let me know.
Just found this by accident when grepping for something else.

Regards,
Sudeep

diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c
index d5f0769f3761..791d70fe82c1 100644
--- a/drivers/firmware/stratix10-svc.c
+++ b/drivers/firmware/stratix10-svc.c
@@ -1094,23 +1094,6 @@ static struct platform_driver stratix10_svc_driver = {
 
 static int __init stratix10_svc_init(void)
 {
-	struct device_node *fw_np;
-	struct device_node *np;
-	int ret;
-
-	fw_np = of_find_node_by_name(NULL, "firmware");
-	if (!fw_np)
-		return -ENODEV;
-
-	np = of_find_matching_node(fw_np, stratix10_svc_drv_match);
-	if (!np)
-		return -ENODEV;
-
-	of_node_put(np);
-	ret = of_platform_populate(fw_np, stratix10_svc_drv_match, NULL, NULL);
-	if (ret)
-		return ret;
-
 	return platform_driver_register(&stratix10_svc_driver);
 }
 
-- 
2.17.1


             reply	other threads:[~2020-04-21 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 17:32 Sudeep Holla [this message]
2020-04-22 21:50 ` [PATCH] firmware: stratix10-svc: Drop unnecessary checking for and populating /firmware/ node Richard Gong
2020-04-23  8:11   ` Sudeep Holla
2020-04-27 19:12     ` Richard Gong
2020-04-28  8:32       ` Sudeep Holla
2020-04-28 14:14         ` Richard Gong
2020-04-28 14:11           ` Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200421173256.34897-1-sudeep.holla@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard.gong@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).