Rafael Vanoni wrote:

> Just noticed that 6682365 changed the kstat module 'battery' to
> 'acpi_drv'. I'm pushing the update in a couple of minutes.
> 
Not perfect, does this mean power usage feature in the new
powertop will not work on the old revision of ON?

I would suggest we implement a simple probe mechanism here.
Something like below:

char *
battery_probe()
{
        ksp = kstat_lookup(kc, "battery", 0, "battery BIF0");
        if (ksp)
                return "battery";
        ksp = kstat_lookup(kc, "acpi_drv", 0, "battery BIF0");
        if (ksp)
                return "acpi_drv";
        return NULL;
}

And battery_stat_snapshot() calls battery probe to do the rest job.
I can make a patch for it if you like.

Thoughts?

Thanks,
-Aubrey



Reply via email to