LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-17-2010, 02:32 PM   #1
zampa
LQ Newbie
 
Registered: Nov 2008
Posts: 5

Rep: Reputation: 0
linux device drivers : how can i unregister a character device ?


Hi all, i'm reading linux device drivers,
and i'm creating a scull-like driver.

I alloc a chrdev region
with
alloc_chrdev_region(&dev,minor_number,number_of_devs);

how can i deallocate it ? I tried with
unregister_chrdev_region but it does work only for
statically allocated devices.

i want to deallocate it so that only a single major number is assigned to my driver and

cat /dev/devices | grep $dev_name
returns no more than 1 line.
 
Old 06-09-2010, 02:27 AM   #2
zampa
LQ Newbie
 
Registered: Nov 2008
Posts: 5

Original Poster
Rep: Reputation: 0
I've resolved.
 
Old 11-01-2010, 02:36 PM   #3
amarknm
LQ Newbie
 
Registered: Oct 2010
Posts: 3

Rep: Reputation: 0
hello dude!!
can you please let me know how u r unregistering in case of dynamic allocation....
 
Old 11-01-2010, 05:06 PM   #4
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,374

Rep: Reputation: 164Reputation: 164
Quote:
Originally Posted by zampa View Post
I've resolved.
Then please tell how you resolved this for other readers and mark the thread solved. Thanks!
 
Old 11-08-2010, 02:12 PM   #5
amarknm
LQ Newbie
 
Registered: Oct 2010
Posts: 3

Rep: Reputation: 0
Hii Zampa,

Can you publish the solutions for this. It might be helpful for me and other ppl who r facing this issue.

Last edited by amarknm; 11-08-2010 at 02:14 PM.
 
Old 06-21-2012, 05:34 AM   #6
krishnateja
LQ Newbie
 
Registered: Jun 2012
Location: Bangalore
Posts: 2

Rep: Reputation: Disabled
Smile i want to deallocate it so that only a single major number is assigned to my driver

Guys can anyone please tell me the solution
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Character device mounting Dufresne Programming 10 04-01-2010 03:37 AM
Difference between using Raw block device with O_DIRECT and Raw Character Device srithi Linux - Newbie 1 08-19-2009 10:52 AM
Difference between Block device and Character device quartslove Fedora 2 11-29-2006 08:50 PM
unregister device problem: hard reset mailmaldi Linux - Software 0 08-26-2006 11:33 AM
unregister sound device linuxmandrake Debian 1 09-27-2005 02:14 AM


All times are GMT -5. The time now is 05:06 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