public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Platform device initialization
@ 2015-02-11 12:15 Tsendrovskii Vladislav
  0 siblings, 0 replies; only message in thread
From: Tsendrovskii Vladislav @ 2015-02-11 12:15 UTC (permalink / raw)
  To: linux-kernel

Hello!

I'm writing module for new SPI master device, and I have some strange 
problem during probing. Exactly, it looks that probe function even 
doesn't called.

static int spi_gpio_cs_probe(struct platform_device* pdev)
{
.....
}
......
static struct platform_driver spi_gpio_cs_driver = {
     .driver = {
         .name    = DRIVER_NAME,
     },
     .probe        = spi_gpio_cs_probe,
     .remove        = spi_gpio_cs_remove,
};

module_platform_driver(spi_gpio_cs_driver);

I've tried to put "return -ENODEV;" and "return -ENOMEM;" in the 
begining of the probe function, but insmod works without error message.
I've looked other modules, which uses platform device infrastructure, 
this part of code in most of them looks the same.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-11 12:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-11 12:15 Platform device initialization Tsendrovskii Vladislav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox