06.09.2020 00:56, Michał Mirosław пишет:
> On Sat, Sep 05, 2020 at 11:41:30PM +0300, Dmitry Osipenko wrote:
>> Use clk-bulk helpers and factor out clocks initialization into separate
>> function in order to make code cleaner.
> [...]
>> --- a/drivers/i2c/busses/i2c-tegra.c
>> +++ b/drivers/i2c/busses/i2c-tegra.c
> [...]
>>  static const struct tegra_i2c_hw_feature tegra194_i2c_hw = {
>>      .has_continue_xfer_support = true,
>>      .has_per_pkt_xfer_complete_irq = true,
>> -    .has_single_clk_source = true,
>>      .clk_divisor_hs_mode = 1,
>>      .clk_divisor_std_mode = 0x4f,
>>      .clk_divisor_fast_mode = 0x3c,
> [...]
>> +static int tegra_i2c_init_clocks(struct tegra_i2c_dev *i2c_dev)
>> +{
>> +    unsigned int i;
>> +    int err;
>> +
>> +    err = devm_clk_bulk_get_all(i2c_dev->dev, &i2c_dev->clocks);
>> +    if (err < 0)
>> +            return err;
>> +
>> +    i2c_dev->nclocks = err
> [...]
> 
> You loose checking whether number of clocks matches the device version.
> Is this intended?

Yes, it's not needed. The check wasn't really needed in the first place.

Reply via email to