lkml.org 
[lkml]   [2023]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cxl/pmu: Ensure put_device on pmu devices
Dave Jiang wrote:
>
>

[snip]

> >
> > Properly call device_unregister() to free up the memory associated with
> > the device.
> >
> > Fixes: 1ad3f701c399 ("cxl/pci: Find and register CXL PMU devices")
> > Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Signed-off-by: Ira Weiny <ira.weiny@intel.com>
>
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
>
> Although I wonder if we can just give device_unregister() to devm_add_action_or_reset() directly.
>

No because the action callback takes void * and device_unregister() takes
a struct device *.

Ira

[snip]

\
 
 \ /
  Last update: 2023-10-17 17:37    [W:0.122 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site