linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: spi-devel-general@lists.sourceforge.net,
	linux-samsung-soc@vger.kernel.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Ben Dooks <ben-linux@fluff.org>,
	Kukjin Kim <kgene.kim@samsung.com>
Subject: Unbalanced calls to spi_master_get in coldfire-qspi and s3c64xx SPI master drivers
Date: Mon, 13 Aug 2012 14:44:25 -0700	[thread overview]
Message-ID: <20120813214425.GA19547@roeck-us.net> (raw)

Hi all,

looking through SPI master drivers, I noticed that the following drivers call
spi_master_get() in their suspend and resume functions. Yet, there is no
matching call to spi_master_put(), meaning the reference count will increase
with each suspend/resume cycle.
	spi-coldfire-qspi.c
	spi-s3c64xx.c
Other SPI master drivers also support suspend and resume, but do not call
spi_master_get() in the suspend/resume functions. The spi-pl022 driver calls
spi_master_suspend() and spi_master_resume() like the above, but does not
call spi_master_get() either.

This leads me to believe that the above drivers will hang on unload after a
suspend/resume cycle due to the extra references.

Can someone please have a look and confirm if my understanding is correct ?
If so I'll send a set of patches to fix the problems.

Thanks,
Guenter

             reply	other threads:[~2012-08-13 21:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13 21:44 Guenter Roeck [this message]
2012-08-16  8:57 ` Unbalanced calls to spi_master_get in coldfire-qspi and s3c64xx SPI master drivers Thomas Abraham
2012-08-16 13:48   ` Guenter Roeck

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=20120813214425.GA19547@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=ben-linux@fluff.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --cc=kgene.kim@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).