Search Linux Wireless

Re: [PATCH v6 2/7] wl1271: propagate set_power's return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 16, 2010 at 9:40 PM, Luciano Coelho
<luciano.coelho@xxxxxxxxx> wrote:
>> +     int ret = wl->if_ops->power(wl, true);
>
> I think it look nicer if you keep the "int ret" in one line by itself
> and then do a ret = wl->if_ops... on another one.

Fixed.

>> +static int wl1271_sdio_power_on(struct wl1271 *wl)
>>  {
>>       struct sdio_func *func = wl_to_func(wl);
>>
>>       sdio_claim_host(func);
>>       sdio_enable_func(func);
>>       sdio_release_host(func);
>> +
>> +     return 0;
>>  }
>
> You seem to always return 0, so the whole chain to pass the value up
> seems unnecessary.  Is this just a preparation for a future patch?

Yes, it's soon going to be:

static int wl1271_sdio_power_on(struct wl1271 *wl)
{
       struct sdio_func *func = wl_to_func(wl);
       int ret;

       ret = pm_runtime_get_sync(&func->dev);
       if (ret)
                 goto out;

       sdio_claim_host(func);
       sdio_enable_func(func);
       sdio_release_host(func);

out:
       return ret;
}


Thanks,
Ohad.

>
> --
> Cheers,
> Luca.
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux