LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 06-12-2008, 08:48 AM   #1
semi-hor
LQ Newbie
 
Registered: Jun 2008
Posts: 2

Rep: Reputation: 0
problem with RTC minor and major allocated dynamically


Hi,

I'm quite new at linux kernel and got some questions.
Usually the major and the minors of RTC are 10 and 135.
But at the rtc-dev.c the mijor is chosen dynamically at __init rtc_dev_init and the rtc_dev_add_device function(which I use to add m41t80 device) use this mijor together with minors that taken from "id" field (it is 0 for the first device, 1 for the second etc).

The problem is that the files system need a node for opening the rtc, which I cannot create staticlly.

Do you have suggestions?



Another thing that I not quitlly understand is why at the linux-2.6.23.1\Documentation\driver-model\class file it is described that for creating a class we got to have a struct device_class with add_device and remove_device functions , and regisger it with devclass_register function, while the i2c-adepter class, i2c-dev class, rtc class are created and registated diffrentlly.

Thank you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
In C, using qsort for dynamically allocated array ntmsz Programming 7 08-23-2005 10:33 AM
why i cant get man major() or minor() henryluo Programming 5 06-27-2005 02:39 AM
Need help: Seg fault, Memcpy, and dynamically allocated arrays benobi Programming 3 06-09-2005 10:58 PM
how to create device node for dynamically allocated major number appas Programming 5 11-01-2004 09:37 AM
major /minor number zyan Linux - General 0 06-22-2001 02:26 AM


All times are GMT -5. The time now is 11:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration