The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: dt.tangr@gmail.com
To: trivial@kernel.org
Cc: linux-kernel@vger.kernel.org, Daniel Tang <dt.tangr@gmail.com>,
	tglx@linutronix.de
Subject: [PATCH 1/2] clocksource: zevio-timer: fix incorrect function definition so the correct function pointer is passed to CLOCKSOURCE_OF_DECLARE
Date: Mon, 25 Nov 2013 15:29:23 +1100	[thread overview]
Message-ID: <1385353764-88784-1-git-send-email-dt.tangr@gmail.com> (raw)

From: Daniel Tang <dt.tangr@gmail.com>


Signed-off-by: Daniel Tang <dt.tangr@gmail.com>
---
 drivers/clocksource/zevio-timer.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/clocksource/zevio-timer.c b/drivers/clocksource/zevio-timer.c
index ca81809..a1bd107 100644
--- a/drivers/clocksource/zevio-timer.c
+++ b/drivers/clocksource/zevio-timer.c
@@ -122,28 +122,27 @@ static irqreturn_t zevio_timer_interrupt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }

-static int __init zevio_timer_add(struct device_node *node)
+static void __init zevio_timer_add(struct device_node *node)
 {
 	struct zevio_timer *timer;
 	struct resource res;
-	int irqnr, ret;
+	int irqnr;

 	timer = kzalloc(sizeof(*timer), GFP_KERNEL);
 	if (!timer)
-		return -ENOMEM;
+		return;

 	timer->base = of_iomap(node, 0);
-	if (!timer->base) {
-		ret = -EINVAL;
+	if (!timer->base)
 		goto error_free;
-	}
+
 	timer->timer1 = timer->base + IO_TIMER1;
 	timer->timer2 = timer->base + IO_TIMER2;

 	timer->clk = of_clk_get(node, 0);
 	if (IS_ERR(timer->clk)) {
-		ret = PTR_ERR(timer->clk);
-		pr_err("Timer clock not found! (error %d)\n", ret);
+		pr_err("Timer clock not found! (error %d)\n",
+				(int)PTR_ERR(timer->clk));
 		goto error_unmap;
 	}

@@ -204,12 +203,12 @@ static int __init zevio_timer_add(struct device_node *node)

 	pr_info("Added %s as clocksource\n", timer->clocksource_name);

-	return 0;
+	return;
 error_unmap:
 	iounmap(timer->base);
 error_free:
 	kfree(timer);
-	return ret;
+	return;
 }

 CLOCKSOURCE_OF_DECLARE(zevio_timer, "lsi,zevio-timer", zevio_timer_add);
--
1.8.1.3


             reply	other threads:[~2013-11-25  4:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25  4:29 dt.tangr [this message]
2013-11-25  4:29 ` [PATCH 2/2] arm: nspire: fix nspire_restart to take enum reboot_mode instead of a char so the correct function pointer is passed to DT_MACHINE_START dt.tangr
2013-12-02 13:54 ` [PATCH 1/2] clocksource: zevio-timer: fix incorrect function definition so the correct function pointer is passed to CLOCKSOURCE_OF_DECLARE Jiri Kosina
2013-12-02 13:58   ` Thomas Gleixner

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=1385353764-88784-1-git-send-email-dt.tangr@gmail.com \
    --to=dt.tangr@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=trivial@kernel.org \
    /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