[PATCH RFC] clk: add gpio controlled clock

Sarha, Jyri jsarha at ti.com
Mon Nov 4 03:17:15 EST 2013


>
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

-----Original Message-----
>From: Lothar Waßmann [mailto:LW at KARO-electronics.de]
>Sent: Monday, November 04, 2013 9:42 AM
>
>Hi,
>
>Jyri Sarha wrote:
>> The added clk-gpio is a basic clock that can be enabled and disabled
...
>> +    err = gpio_request_one(gpio, gpio_flags, name);
>> +    if (err) {
>> +            pr_err("%s: Error requesting clock control gpio %u\n",
>> +                   __func__, gpio);
>> +            return ERR_PTR(-EINVAL);
>>
>You already have an error code from the gpio_request_one() call.
>Why return a different one?

I was just thinking the gpio number is more useful for debugging that the error code. Could print the both of cource.

>> +
>> +    clk_gpio = kzalloc(sizeof(struct clk_gpio), GFP_KERNEL);
>
>devm_kzalloc()?

Good point. I'll change that.

Thanks,
Jyri



More information about the linux-arm-kernel mailing list