Re: [PATCH 1/2] amd76x_pm: C2 powersaving for AMD K7

From: Joerg Sommrey
Date: Wed Jan 11 2006 - 12:54:31 EST


On Wed, Jan 11, 2006 at 03:20:57AM -0800, Andrew Morton wrote:
> Joerg Sommrey <jo@xxxxxxxxxx> wrote:
> >
> > +static void
> > +config_amd768_C2(int enable)
> > +{
> > + unsigned char regbyte;
> > +
> > + /* Set C2 options in DevB:3x4F, page 100 in AMD-768 doc */
> > + pci_read_config_byte(pdev_sb, 0x4F, &regbyte);
> > + if(enable)
> > + regbyte |= C2EN;
> > + else
> > + regbyte ^= C2EN;
>
> &= ?
This piece of code was not written by me. I agree
regbyte &= ^C2EN;
is more common. However, calling config_amd768_C2(0) *would* work, if
config_amd768_C2(1) had been called before. But config_amd768_C2(0)
never gets called...

Seems like I need to fix this too.

-jo

--
-rw-r--r-- 1 jo users 63 2006-01-10 20:55 /home/jo/.signature
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/