All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Dargaud <dargaud@lpsc.in2p3.fr>
To: linuxppc-dev@lists.ozlabs.org
Subject: Replacement to of_register_platform_driver ?
Date: Wed, 13 Jun 2012 17:21:22 +0200	[thread overview]
Message-ID: <4FD8AFF2.6000702@lpsc.in2p3.fr> (raw)

Hello all,
I just updated to the most recent kernel and a driver I wrote last year 
won't compile:
xad.c:534:2: error: implicit declaration of function 
'of_register_platform_driver'

I see references to this function as 'obsolete' but could not find 
what's the new recommended way to do things. Here's a bit of the 
offending code:

static struct of_platform_driver xad_driver = {
	.probe  = xad_driver_probe,
	.remove = xad_driver_remove,
	.driver = {
		.owner = THIS_MODULE,
		.name = "xad-driver",
		.of_match_table = xad_device_id,
	},
};

...

static int __init xad_init(void) {
...	
	first = MKDEV (my_major, my_minor);
	register_chrdev_region(first, count, DEVNAME);
	my_cdev = cdev_alloc ();
	if (NULL==my_cdev) goto Err;
	
	cdev_init(my_cdev, &fops);
	rc=cdev_add (my_cdev, first, count);
...	
	rc = of_register_platform_driver(&xad_driver);
...
}


-- 
Guillaume Dargaud
http://www.gdargaud.net/

             reply	other threads:[~2012-06-13 16:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 15:21 Guillaume Dargaud [this message]
2012-06-13 17:47 ` Replacement to of_register_platform_driver ? Ira W. Snyder
2012-06-14  0:28 ` Michael Ellerman

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=4FD8AFF2.6000702@lpsc.in2p3.fr \
    --to=dargaud@lpsc.in2p3.fr \
    --cc=linuxppc-dev@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.