LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jiri Kosina <jikos@jikos.cz>
To: Markku Savela <msa@moth.iki.fi>
Cc: greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: How to get /dev entry created automaticly for dynamic major number?
Date: Thu, 25 Jan 2007 14:37:02 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0701251425320.21127@twin.jikos.cz> (raw)
In-Reply-To: <200701251311.l0PDBFD0025319@moth.iki.fi>

On Thu, 25 Jan 2007, Markku Savela wrote:

> Thanks! The solution seems to work. The final *obstacle* was, that
> class_* symbols were not available until I added the
> LICENSE("GPL"). Here is the resulting template, maybe useful for
> someone, and just for verification, that I got it right.
> static struct class_device *foo_device;
[...]
>     foo_device = class_device_create(foo_class, NULL, MKDEV(foo_major, 0), NULL, "foo0");
[...]

You should probably rather move away from struct class_device and 
class_device_create() and use struct device and device_create() instead 
(all the drivers using class_device are currently being converted this 
way, so that class_device could go away), so that your driver is using the 
new kernel driver core API.

The conversion should be really very simple.

-- 
Jiri Kosina

  parent reply	other threads:[~2007-01-25 13:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25  7:35 Markku Savela
2007-01-25  8:25 ` Greg KH
2007-01-25 13:11   ` Markku Savela
2007-01-25 13:17     ` Markku Savela
2007-01-25 13:37     ` Jiri Kosina [this message]
2007-01-25 15:51     ` Greg KH

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=Pine.LNX.4.64.0701251425320.21127@twin.jikos.cz \
    --to=jikos@jikos.cz \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=msa@moth.iki.fi \
    --subject='Re: How to get /dev entry created automaticly for dynamic major number?' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).