public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <atull@opensource.altera.com>
To: <gregkh@linuxfoundation.org>
Cc: Josh Cartwright <joshc@ni.com>,
	Moritz Fischer <moritz.fischer@ettus.com>,
	<linux-kernel@vger.kernel.org>, <delicious.quinoa@gmail.com>,
	<dinguyen@opensource.altera.com>,
	Alan Tull <atull@opensource.altera.com>
Subject: [PATCH] fpga manager: remove label
Date: Thu, 29 Oct 2015 14:39:56 -0500	[thread overview]
Message-ID: <1446147596-13185-1-git-send-email-atull@opensource.altera.com> (raw)

From: Alan Tull <atull@opensource.altera.com>

Remove implementation of 'label' DT binding.

Signed-off-by: Alan Tull <atull@opensource.altera.com>
---
 drivers/fpga/fpga-mgr.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
index 45c41cb..f747311 100644
--- a/drivers/fpga/fpga-mgr.c
+++ b/drivers/fpga/fpga-mgr.c
@@ -257,7 +257,6 @@ int fpga_mgr_register(struct device *dev, const char *name,
 		      void *priv)
 {
 	struct fpga_manager *mgr;
-	const char *dt_label;
 	int id, ret;
 
 	if (!mops || !mops->write_init || !mops->write ||
@@ -305,11 +304,9 @@ int fpga_mgr_register(struct device *dev, const char *name,
 	mgr->dev.id = id;
 	dev_set_drvdata(dev, mgr);
 
-	dt_label = of_get_property(mgr->dev.of_node, "label", NULL);
-	if (dt_label)
-		ret = dev_set_name(&mgr->dev, "%s", dt_label);
-	else
-		ret = dev_set_name(&mgr->dev, "fpga%d", id);
+	ret = dev_set_name(&mgr->dev, "fpga%d", id);
+	if (ret)
+		goto error_device;
 
 	ret = device_add(&mgr->dev);
 	if (ret)
-- 
1.7.9.5


             reply	other threads:[~2015-10-29 19:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29 19:39 atull [this message]
2015-10-29 21:17 ` [PATCH] fpga manager: remove label Moritz Fischer
2015-10-29 22:18 ` Greg KH

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=1446147596-13185-1-git-send-email-atull@opensource.altera.com \
    --to=atull@opensource.altera.com \
    --cc=delicious.quinoa@gmail.com \
    --cc=dinguyen@opensource.altera.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joshc@ni.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moritz.fischer@ettus.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