LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   how do I access drvdata registered with device_create from my char ioctl (https://www.linuxquestions.org/questions/linux-kernel-70/how-do-i-access-drvdata-registered-with-device_create-from-my-char-ioctl-4175450163/)

bartb7 02-14-2013 01:24 PM

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.


All times are GMT -5. The time now is 10:49 AM.