Re: [PATCH 2/2] Fix console handling during suspend/resume

Nigel Cunningham
2006-06-24T11:16:30Z

[-- Attachment #1.1: Type: text/plain, Size: 1191 bytes --]

Hi.

I've been quiet so far because I'm too busy with other things. I am reading
the discussion (if that's the right word) though.

A couple of questions about the patch:

> +static int resume_device_early(struct device * dev)
> +{
> + int error = 0;
>
> + if (dev->bus && dev->bus->resume_early) {
> + dev_dbg(dev,"EARLY resume\n");
> + error = dev->bus->resume(dev);

Should this be resume_early(dev)?

> +/*
> + * Resume the devices that have either not gone through
> + * the late suspend, or that did go through it but also
> + * went through the early resume
> + */
> void dpm_resume(void)
> {
> down(&dpm_list_sem);
> @@ -96,11 +115,9 @@ void dpm_power_up(void)
> struct list_head * entry = dpm_off_irq.next;
> struct device * dev = to_device(entry);
>
> - get_device(dev);
> list_del_init(entry);
> - list_add_tail(entry, &dpm_active);
> - resume_device(dev);
> - put_device(dev);
> + list_add_tail(entry, &dpm_off);
> + resume_device_early(dev);

No need for getting a reference on the device anymore?

Regards,

Nigel
--
Nigel, Michelle and Alisdair Cunningham
5 Mitchell Street
Cobden 3266
Victoria, Australia

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]