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

From: Russell King
Date: Sat Oct 23 2004 - 15:56:16 EST


On Thu, Oct 21, 2004 at 08:25:00AM -0500, Dmitry Torokhov wrote:
> 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.

Sure, it works for x86 using APM. Don't forget there's ACPI and the
device model PM implementation (and swsusp). The latter two did not
call the old interfaces last time I checked.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
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/