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 Mon, Aug 03, 2020 at 07:04:56PM -0300, Daniel Gutson wrote:
> > > > Think of this as an input device. You don't put the random input
> > > > attributes all in one place, you create a new device that represents the
> > > > input interface and register that.
>
> I'm having trouble with this. What's the dev_t for the child devices?
> I'm doing
> child_device = device_create(&my_class, &pdev->dev, MKDEV(0, 0),
> NULL, "child");
> pdev is the pci_device (intel-spi-pci)
> dmesg shows
>
> sysfs: cannot create duplicate filename '/class/my-class'
> (call trace)
> kobject_add_internal failed for my-class with -EEXIST, don't try
> to register things with the same name in the same directory.

Without seeing all of your code, I can't tell you what you are doing
wrong, but the kernel should be giving you a huge hint here...

Don't create duplicate names in the same subdirectory.

thanks,

greg k-h

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