public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tsendrovskii Vladislav <vlad@vltc.net.eu.org>
To: linux-kernel@vger.kernel.org
Subject: Platform device initialization
Date: Wed, 11 Feb 2015 15:15:13 +0300	[thread overview]
Message-ID: <54DB47D1.9040503@vltc.net.eu.org> (raw)

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.


                 reply	other threads:[~2015-02-11 12:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=54DB47D1.9040503@vltc.net.eu.org \
    --to=vlad@vltc.net.eu.org \
    --cc=linux-kernel@vger.kernel.org \
    /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