devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: "Heiko Stübner" <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Cc: Alessandro Zummo
	<a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>,
	"rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org"
	<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	Pawel Moll <Pawel.Moll-5wv7dgnIgG8@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org"
	<rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>,
	Mike Turquette
	<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>

[...]

> +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.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent 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
     [not found]   ` <201311222255.03642.heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
2013-11-25 11:50     ` Mark Rutland
     [not found] ` <201311222254.07730.heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
2013-11-22 21:55   ` [PATCH 2/2] rtc: add hym8563 rtc-driver Heiko Stübner
     [not found]     ` <201311222255.48943.heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
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-5wv7dgnigg8@public.gmane.org \
    --cc=Pawel.Moll-5wv7dgnIgG8@public.gmane.org \
    --cc=a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.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;
as well as URLs for NNTP newsgroup(s).