platform device as parent of a miscdevice

Greg KH greg at kroah.com
Tue Mar 30 12:49:14 EDT 2021


On Tue, Mar 30, 2021 at 06:04:09PM +0200, Martin Kaiser wrote:
> Yet again, this seems to work ok. I was surprised to see that there's
> very few (if any) mainline drivers that do something similar. Does this
> approach make sense? Does it have any implications that I should be
> aware of (e.g.  does the link between pdev and miscdevice cause problems
> for suspend/resume)?

Not at all, this is what you should be done, and is what many misc
devices do, that's why the parent pointer is there :)

What in-kernel misc drivers do not do that that you feel should?

thanks,

greg k-h



More information about the Kernelnewbies mailing list