Re: register_device: was: Re: [PATCH v6 06/11] printk: console: Introduce sysfs interface for per-console loglevels

From: Greg Kroah-Hartman
Date: Thu Nov 14 2024 - 23:08:12 EST


On Thu, Nov 14, 2024 at 01:41:31PM -0500, Chris Down wrote:
> Petr Mladek writes:
> > Honestly, I am not sure how to review this. I am not familiar with
> > these APIs. I have spent few hours trying to investigate various
> > drivers but I did not find any similar use case. I tried to look
> > for documentation but I did not find any good HOWTO.
> >
> > It seems to work but it is the only thing that I could
> > say about it ;-)
> >
> > Just by chance, do you have any pointers into a code or
> > documentation which could help me to feel more comfortable?
>
> I think you and I are in a similar boat :-) Some similar code can be seen in
> places like block/genhd.c in device_add_disk and __alloc_disk_node, which
> also do this kind of dynamic setup. I mostly just spent my time looking at
> device.h and its users.
>
> Greg, maybe you could also take a look?

Sorry, I missed that you were adding a new sysfs api here. Yes, I'll
add this to my queue to review, give me a few days...

thanks,

greg k-h