Re: [PATCH 5.15] staging: most: dim2: use device release method

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

 



On Mon, Dec 13, 2021 at 09:13:46PM +0300, Nikita Yushchenko wrote:
> Upstream commit d445aa402d60014a37a199fae2bba379696b007d.
> 
> Commit 723de0f9171e ("staging: most: remove device from interface
> structure") moved registration of driver-provided struct device to
> the most subsystem. This updated dim2 driver as well.
> 
> However, struct device passed to register_device() becomes refcounted,
> and must not be explicitly deallocated, but must provide release method
> instead. Which is incompatible with managing it via devres.
> 
> This patch makes the device structure allocated without devres, adds
> device release method, and moves device destruction there.
> 
> Fixes: 723de0f9171e ("staging: most: remove device from interface structure")
> Signed-off-by: Nikita Yushchenko <nikita.yoush@xxxxxxxxxxxxxxxxxx>
> Link: https://lore.kernel.org/r/20211005143448.8660-2-nikita.yoush@xxxxxxxxxxxxxxxxxx
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/staging/most/dim2/dim2.c | 55 +++++++++++++++++---------------
>  1 file changed, 30 insertions(+), 25 deletions(-)

Both now queued up, thanks.

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux