[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFRkauD-S3hxLJLDmpte4cduKL53F=XDrU1pkBER6C1xVyxG=w@mail.gmail.com>
Date: Tue, 19 Feb 2013 09:58:42 +0800
From: Axel Lin <axel.lin@...ics.com>
To: "Kim, Milo" <Milo.Kim@...com>
Cc: Mark Brown <broonie@...nsource.wolfsonmicro.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/4] regulator: core: support shared enable GPIO concept
> + if (pin->request_count <= 1) {
> + pin->request_count = 0;
> + gpio_free(pin->gpio);
> + list_del(&pin->list);
> + kfree(pin);
> + } else {
> + pin->request_count--;
> + }
How about change above lines to this:
if (--pin->request_count == 0) {
gpio_free(pin->gpio);
list_del(&pin->list);
kfree(pin);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists