LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 02-14-2013, 01:24 PM   #1
bartb7
LQ Newbie
 
Registered: Feb 2013
Posts: 1

Rep: Reputation: Disabled
how do I access drvdata registered with device_create from my char ioctl


I am creating a device: device_create(my_char_cl, NULL, MKDEV(my_char_major, 0),
private, "mydev%d", 0);
and passing in a pointer "private". How do I access this pointer from my ioctl:

static long my_char_ioctl(struct file *f, unsigned int cmd,
unsigned long arg)
{
...
The ioctl works fine, I just need to get access to the drvdata passed into device_create.
 
  


Reply



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
[SOLVED] device_create - too many arguments sindhu4sind Linux - Newbie 4 05-26-2012 02:10 AM
'ioctl ()' returns error on IDE access linux1001 Linux - Newbie 1 04-24-2012 08:31 AM
IOCTL function call to access the Secure Digital(SD) cards ranju* Programming 0 06-13-2009 01:04 AM
How to pass IOCTL arguments from usespace ioctl call devkpict Linux - Kernel 1 12-07-2007 06:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:21 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration