mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	Pawel Moll <Pawel.Moll@arm.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"rtc-linux@googlegroups.com" <rtc-linux@googlegroups.com>,
	Mike Turquette <mturquette@linaro.org>
Subject: Re: [PATCH 2/2] rtc: add hym8563 rtc-driver
Date: Mon, 25 Nov 2013 12:01:25 +0000	[thread overview]
Message-ID: <20131125120125.GD32081@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <201311222255.48943.heiko@sntech.de>

[...]

> +static int hym8563_probe(struct i2c_client *client,
> +                        const struct i2c_device_id *id)
> +{
> +       struct hym8563 *hym8563;
> +       int ret, gpio_int;
> +
> +       hym8563 = devm_kzalloc(&client->dev, sizeof(hym8563), GFP_KERNEL);
> +       if (!hym8563)
> +               return -ENOMEM;
> +
> +       hym8563->client = client;
> +       i2c_set_clientdata(client, hym8563);
> +
> +       device_set_wakeup_capable(&client->dev, true);
> +
> +       gpio_int = of_get_gpio(client->dev.of_node, 0);
> +       if (!gpio_is_valid(gpio_int)) {
> +               dev_err(&client->dev, "failed to get interrupt gpio\n");
> +               return -EINVAL;
> +       }
> +
> +       ret = devm_gpio_request_one(&client->dev, gpio_int,
> +                                     GPIOF_DIR_IN, "hym8563_int");
> +       if (ret) {
> +               dev_err(&client->dev, "request of gpio %d failed, %d\n",
> +                       gpio_int, ret);
> +               return ret;
> +       }

>From here on the gpio is never used or even stashed away anywhere.
What's the point in requesting it and then leaking it?

Thanks,
Mark.

  reply	other threads:[~2013-11-25 12:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 21:54 [PATCH 0/2] Add support for hym8563 rtcs Heiko Stübner
2013-11-22 21:55 ` [PATCH 1/2] dt-bindings: add hym8563 binding Heiko Stübner
2013-11-25 11:50   ` Mark Rutland
2013-11-22 21:55 ` [PATCH 2/2] rtc: add hym8563 rtc-driver Heiko Stübner
2013-11-25 12:01   ` Mark Rutland [this message]
2013-11-25 23:40     ` Heiko Stübner

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=20131125120125.GD32081@e106331-lin.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=Pawel.Moll@arm.com \
    --cc=a.zummo@towertech.it \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=heiko@sntech.de \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=rob.herring@calxeda.com \
    --cc=rtc-linux@googlegroups.com \
    --cc=swarren@wwwdotorg.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

all inboxes | Powered by JetHome®