lkml.org 
[lkml]   [2013]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] rtc: add hym8563 rtc-driver
[...]

> +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.


\
 
 \ /
  Last update: 2013-11-25 13:21    [W:0.147 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site