Re: [PATCH v3 1/4] regulator: core: support shared enable GPIO concept

From: Axel Lin
Date: Mon Feb 18 2013 - 20:58:46 EST


> + 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/