mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Federico Vaga <federico.vaga@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alessandro Rubini <rubini@gnudd.com>
Cc: linux-kernel@vger.kernel.org, Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: Re: drivers/base/core.c: about device_find_child() function
Date: Mon, 15 Apr 2013 10:55:11 +0200	[thread overview]
Message-ID: <6047971.1xXAvlS68s@harkonnen> (raw)
In-Reply-To: <20130412220633.GA16524@kroah.com>

Thank you very much Greg
 
> > I did not study serial_core, I was looking only for device_find_child().
> > Probably I'm missing something. Anyway, here what does not convice me:
> > 
> > (line number on next-20130412)
> > serial_core.c:2003
> > 
> > 	tty_dev = device_find_child(uport->dev, &match, serial_match_port);
> > 	if (!uport->suspended && device_may_wakeup(tty_dev)) {
> > 	
> > 		if (uport->irq_wake) {
> > 		
> > 			disable_irq_wake(uport->irq);
> > 			uport->irq_wake = 0;
> > 		
> > 		}
> > 
> > +               put_device(tty_dev);
> > 
> > 		mutex_unlock(&port->mutex);
> > 		return 0;
> > 	
> > 	}
> > 
> > +	put_device(tty_dev);
> > 
> > 	uport->suspended = 0;
> > 
> > serial_core:1936
> > 
> > 	tty_dev = device_find_child(uport->dev, &match, serial_match_port);
> > 	if (device_may_wakeup(tty_dev)) {
> > 	
> > 		if (!enable_irq_wake(uport->irq))
> > 		
> > 			uport->irq_wake = 1;
> > 		
> > 		put_device(tty_dev);
> > 		mutex_unlock(&port->mutex);
> > 		return 0;
> > 	
> > 	}
> > 
> > +	put_device(tty_dev);
> 
> That looks like a good patch, care to properly send it, (after you test
> it first of course), so that we can apply it?

Yes, I can do it and test it. I hope to find the time for a test in these 
days.

-- 
Federico Vaga

  reply	other threads:[~2013-04-15  8:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 11:52 Federico Vaga
2013-04-11 13:48 ` Greg Kroah-Hartman
2013-04-12 12:09   ` Federico Vaga
2013-04-12 22:06     ` Greg Kroah-Hartman
2013-04-15  8:55       ` Federico Vaga [this message]
2013-04-13  7:59     ` Lars-Peter Clausen
2013-04-15  8:51       ` Federico Vaga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6047971.1xXAvlS68s@harkonnen \
    --to=federico.vaga@gmail.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rubini@gnudd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®