lkml.org 
[lkml]   [2005]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Fwd: [PATCH] [PNP][RFC] Suspend support for PNP bus.]
Dmitry Torokhov wrote:
> On 11/4/05, Pierre Ossman <drzeus-list@drzeus.cx> wrote:
>
>> +
>> +int pnp_start_dev(struct pnp_dev *dev)
>> +{
>> + if (!pnp_can_write(dev)) {
>> + pnp_info("Device %s does not supported activation.", dev->dev.bus_id);
>>
>
> "...does not support...", there is no "ed" at the end.
>
>

That's just code that's been moved around. But I suppose a speling fix
could be included in the same patch. :)

>> + return -EINVAL;
>> + }
>>
>
> Hmm, would'nt presence of such device stop suspend process? It will
> cause pnp_bus_resume to fail too. Perhaps returning 0 in this case is
> better.
>
>

The problem is that this code is also visited from pnp_activate_dev() &
co where this return value is needed. For pnp_stop_dev() the same check
(pnp_can_disable()) is performed in the suspend routine to avoid that
particular problem. For resume my assumption was that a device that
doesn't support activation will not have a driver attached to it.
Perhaps this is wrong?

Rgds
Pierre
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-04 16:18    [W:0.141 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site