Re: [PATCH 01/19] char_dev: replace cdev_map with an xarray

Christoph Hellwig
2020-08-27T09:39:57Z

On Thu, Aug 27, 2020 at 11:18:59AM +0200, Greg Kroah-Hartman wrote:
> > I looked at it, but it does get registered and shows up in sysfs.
>
> It does? Where does that happen? I see a bunch of kobject_init()
> calls, but nothing that registers it in sysfs that I can see.

Hmm, true.

>
> Note, this is not the kobject that shows up in /sys/dev/char/ as a
> symlink, that comes from the driver core logic and is independent of the
> cdev code.
>
> The kobject does handle the structure lifetime rules, but that should be
> able to be replaced with a simple kref instead.

Yeah. I'll let you handle this stuff, as you obviously know the area
better than I do.