Subject: Re: com rumblings...
To: None <email@example.com>
From: Christos Zoulas <firstname.lastname@example.org>
Date: 06/16/2006 17:47:37
In article <BD9055CF-C21A-4065-B52B-BBD788A90F54@shagadelic.org>,
Jason Thorpe <email@example.com> wrote:
>On Jun 16, 2006, at 9:17 AM, Garrett D'Amore wrote:
>> I'm trying to understand what you mean by this comment;
>> particularly in
>> the context of this discussion. Specifically, are you saying its a
>> idea to initialize a softc that isn't really a softc (as Tsutsui-san
>> suggests), or that it is a bad idea to use some pseudo-softc structure
>> (ala struct com_regs) like I've done?
>The former. It is bad practice, IMO, to create a softc that isn't
>really a softc.
I agree; the opl driver used to do this, and it was unclear which fields
of the softc the probe routine wanted initialized. At least 10 drivers
used this, initializing the softc slightly differently. Some uses memset()
to 0 it initialized iot and ioh, others set an additional field and did not
bother with the rest.