Krzysztof Helt | 1 Jul 2007 18:36
Picon
Favicon

Re: [RESEND][PATCH] THMC50 and ADM1022 support for 2.6 kernel (improved)

Thank you very much for the review.

There is one thing I still need help with.

On Sun, 1 Jul 2007 10:03:25 -0400
"Mark M. Hoffman" <mhoffman <at> lightlink.com> wrote:

> > +	if (kind == thmc50) {
> > +		type_name = "thmc50";
> > +	/* Remove temp3 attributes */
> > +		thmc50_group.attrs[8] = NULL;
> > +		thmc50_group.attrs[9] = NULL;
> > +		thmc50_group.attrs[10] = NULL;
> 
> Hrm, fragile.  Please just put these in a separate group, as other hwmon
> drivers do.  Ultimately, the attr arrays should be defined const as well
> anyway, but for some missing const modifiers in the driver core.

I know it is kind of hack. Can you point me to the "other hwmon drivers"? The drivers
which use groups to remove/add some of attributes depending on mode/chip type in correct
way.

Regards,
Krzysztof

_______________________________________________
lm-sensors mailing list
lm-sensors <at> lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

(Continue reading)

Mark M. Hoffman | 1 Jul 2007 19:07

Re: [RESEND][PATCH] THMC50 and ADM1022 support for 2.6 kernel (improved)

Hi Krzysztof:

* Krzysztof Helt <krzysztof.h1 <at> wp.pl> [2007-07-01 18:36:55 +0200]:
> Thank you very much for the review.
> 
> There is one thing I still need help with.
> 
> On Sun, 1 Jul 2007 10:03:25 -0400
> "Mark M. Hoffman" <mhoffman <at> lightlink.com> wrote:
> 
> > > +	if (kind == thmc50) {
> > > +		type_name = "thmc50";
> > > +	/* Remove temp3 attributes */
> > > +		thmc50_group.attrs[8] = NULL;
> > > +		thmc50_group.attrs[9] = NULL;
> > > +		thmc50_group.attrs[10] = NULL;
> > 
> > Hrm, fragile.  Please just put these in a separate group, as other hwmon
> > drivers do.  Ultimately, the attr arrays should be defined const as well
> > anyway, but for some missing const modifiers in the driver core.
> 
> I know it is kind of hack. Can you point me to the "other hwmon drivers"? The drivers
> which use groups to remove/add some of attributes depending on mode/chip type in correct
> way.

One such driver is w83627hf.c.

Regards,

--

-- 
(Continue reading)


Gmane