lkml.org 
[lkml]   [2020]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Platform lockdown information in SYSFS
On Tue, Aug 04, 2020 at 11:37:02AM -0300, Daniel Gutson wrote:
> static void mypci_remove(struct pci_dev *pdev)
> {
> /*
> I tried enabling and disabling this
> if (child_device != NULL) {
> put_device(child_device);
> device_unregister(child_device);
> }
> */

You can just call device_destroy() here, but this should be the same.

But, if you have it commented out, that's not good, you have to clean
this up.

> class_remove_file(&my_class, &class_attr_howareyou);

You don't always have to remove files you create, but it doesn't hurt.

> class_unregister(&my_class);

class_destroy()? But this is the same as well, so all is good.

Try running without the above code commented out.

greg k-h

\
 
 \ /
  Last update: 2020-08-04 18:43    [W:0.124 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site