Re: [PATCH 7/7] Input: remove pm_dev from core

From: Dmitry Torokhov
Date: Thu Oct 21 2004 - 08:42:56 EST


On Thursday 21 October 2004 04:13 am, Russell King wrote:
> On Thu, Oct 21, 2004 at 02:30:02AM -0500, Dmitry Torokhov wrote:
> > ChangeSet@xxxxxx, 2004-10-20 00:57:45-05:00, dtor_core@xxxxxxxxxxxxx
> > Input: get rid of pm_dev in input core as it is deprecated and
> > nothing uses it anyway.
>
> You might as well remove it completely - anything which uses the
> driver model PM implementation will never call these methods, and
> ARM uses the driver model PM implementation.
>
> Therefore, any driver using the obsolete pm_register() functions
> won't receive any PM events.
>
> Same is true on x86 btw.
>

Hmm, I admit I missed arm case but for x86 should work actually:

in arch/i386/kernel/apm.c:
static int suspend(int vetoable)
{
int err;
struct apm_user *as;

if (pm_send_all(PM_SUSPEND, (void *)3)) {
/* Vetoed */
if (vetoable) {
if (apm_info.connection_version > 0x100)
set_system_power_state(APM_STATE_REJECT);
err = -EBUSY;
ignore_sys_suspend = 0;
printk(KERN_WARNING "apm: suspend was vetoed.\n");
goto out;
}
printk(KERN_CRIT "apm: suspend was vetoed, but suspending anyway.\n");
}

device_suspend(3);
device_power_down(3);
...

but since you say arm does not care I think we'll proceed with the patch.

--
Dmitry
-
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/