linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	Felipe Balbi <balbi@ti.com>
Subject: [PATCH 2/4] cbus: retu: no need to pass devid via pdata
Date: Mon, 17 Oct 2011 23:50:41 +0300	[thread overview]
Message-ID: <1318884643-4137-2-git-send-email-balbi@ti.com> (raw)
In-Reply-To: <1318884643-4137-1-git-send-email-balbi@ti.com>

that's a constant, which will never change.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/cbus/retu.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/cbus/retu.c b/drivers/cbus/retu.c
index 464fc0c..d2f43bb 100644
--- a/drivers/cbus/retu.c
+++ b/drivers/cbus/retu.c
@@ -46,8 +46,6 @@ struct retu {
 	struct mutex		mutex;
 	struct device		*dev;
 
-	int			devid;
-
 	int			irq_base;
 	int			irq_end;
 
@@ -71,7 +69,7 @@ static struct retu *the_retu;
  */
 static int __retu_read_reg(struct retu *retu, unsigned reg)
 {
-	return cbus_read_reg(retu->dev, retu->devid, reg);
+	return cbus_read_reg(retu->dev, CBUS_RETU_DEVICE_ID, reg);
 }
 
 /**
@@ -82,7 +80,7 @@ static int __retu_read_reg(struct retu *retu, unsigned reg)
  */
 static void __retu_write_reg(struct retu *retu, unsigned reg, u16 val)
 {
-	cbus_write_reg(retu->dev, retu->devid, reg, val);
+	cbus_write_reg(retu->dev, CBUS_RETU_DEVICE_ID, reg, val);
 }
 
 /**
@@ -430,7 +428,6 @@ static int retu_allocate_children(struct device *parent, int irq_base)
 static int __devinit retu_probe(struct platform_device *pdev)
 {
 	struct retu	*retu;
-	struct cbus_retu_platform_data *pdata = pdev->dev.platform_data;
 
 	int		ret = -ENOMEM;
 	int		rev;
@@ -452,7 +449,6 @@ static int __devinit retu_probe(struct platform_device *pdev)
 	retu->irq	= platform_get_irq(pdev, 0);
 	retu->irq_base	= ret;
 	retu->irq_end	= ret + MAX_RETU_IRQ_HANDLERS;
-	retu->devid	= pdata->devid;
 	retu->dev	= &pdev->dev;
 	the_retu	= retu;
 
-- 
1.7.7


  reply	other threads:[~2011-10-17 20:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17 20:50 [PATCH 1/4] cbus: add of_match_table Felipe Balbi
2011-10-17 20:50 ` Felipe Balbi [this message]
2011-10-17 20:50 ` [PATCH 3/4] cbus: move device IDs to local header Felipe Balbi
2011-10-17 20:50 ` [PATCH 4/4] cbus: retu: drop useless platform_data Felipe Balbi
2011-11-03 21:45 ` [PATCH 1/4] cbus: add of_match_table Tony Lindgren
2011-11-04  9:13   ` Felipe Balbi
2011-11-04 12:42     ` Cousson, Benoit

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=1318884643-4137-2-git-send-email-balbi@ti.com \
    --to=balbi@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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).