Platform device initialization

From: Tsendrovskii Vladislav
Date: Wed Feb 11 2015 - 07:21:54 EST


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.

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