Subject: Re: Separating softc and struct device?
To: None <tech-kern@netbsd.org>
From: Jachym Holecek <freza@NetBSD.org>
List: tech-kern
Date: 08/29/2007 23:28:21
# Valeriy E. Ushakov 2007-08-29:
> On Wed, Aug 29, 2007 at 22:22:20 +0200, Joerg Sonnenberger wrote:
> > is there a good reason to keep all the pointer casts for
> > device softc's to struct device and vice versa? I think it would be good
> > to follow the changes in ifnet vs arpcom and use direct pointer.
> > An additional goody would be that struct device could become an abstract
> > type and modifying it gets easier.
> 
> And we already have void *device_private(device_t); that's currently
> is a no-op (returns back its argument), but you can use it on existing
> code to easily mark it up for split device/softc.

There's *a lot* of code that just ignores device_*() accessors and
touches 'struct device' members, unfortunately...

(FWIW I like the plan outlined earlier in this thread)

	-- Jachym