Thread (43 messages) 43 messages, 7 authors, 2012-08-01

[06/10,V2] spi: Add SPI driver for mx233/mx28

flat view

From: Shawn Guo <hidden>
Date: 2012-08-01 08:20:26
Also in: linux-spi

On Wed, Aug 01, 2012 at 09:38:07AM +0200, Lothar Wa?mann wrote:
Shawn Guo writes:
quoted
On Wed, Aug 01, 2012 at 08:45:19AM +0200, Marek Vasut wrote:
quoted
quoted
I must be missing something.  Why do almost all spi drivers call it in the
error path, even if there is no call to spi_master_get ?
To push the refcounting to 0, to deallocate the device, I'd say ...
It's not going to work if spi_master_put is called without
spi_master_get being called before that.
spi_alloc_master() calls device_initialize() which resuires a
device_put() (called from spi_master_put()) to free the device.
Ah, indeed.  I missed that kref_init() will initialize the refcount
to 1.

Thanks,
Shawn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help