lkml.org 
[lkml]   [2007]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to get /dev entry created automaticly for dynamic major number?
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-25 15:25    [W:0.303 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site