lkml.org 
[lkml]   [2018]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4] staging: bcm2835-audio: Release resources on module_exit()
From
Date
On 03/23/18 17:23, Andy Shevchenko wrote:
> On Thu, Mar 22, 2018 at 11:37 PM, Kirill Marinushkin
> <k.marinushkin@gmail.com> wrote:
>
>
>> +static void snd_devm_release(struct device *dev)
>> +{
>> + struct bcm2835_chip *chip = dev_get_drvdata(dev);
>> +
>> + kfree(chip);
>> +}
>> + device->release = snd_devm_release;
> This is not devm function, so, it would be rather called
> snd_bcm2835_release().

Ah, you mean "devm" in the names. Now I got it.
Agree, I will rename it to "snd_bcm2835_release()"

>
>> static struct snd_card *snd_devm_card_new(struct device *dev)
>> {
>> struct snd_card *card;
>> int ret;
>>
>> ret = snd_card_new(dev, -1, NULL, THIS_MODULE, 0, &card);
>> + if (ret)
>> return ERR_PTR(ret);
>>
>> return card;
>> }
> Same here. You removed anything related to devm here, so, please make
> function name consistent.

Good, I will rename it to "snd_bcm2835_card_new()"

> After addressing above, FWIW,
>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>

\
 
 \ /
  Last update: 2018-03-23 20:22    [W:0.075 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site