Welcome to the Linux Foundation Forum!

How to get device pointer address in Kernel Module


Hi everybody,

I want to use

static inline int hid_hw_raw_request(struct hid_device *hdev,
unsigned char reportnum, __u8 *buf,
size_t len, unsigned char rtype, int reqtype)


in my kernel module. How can I get hdev of existing /dev/hidraw0 ?

hdev = give_me_the_address_of(dev/hidraw0) :smiley:

Regards, PP


  • powerpenguin
    powerpenguin Posts: 4
    edited July 2020

    No Ideas ? whats going on with the kernel module professionals !
    Is it not possibe to catch a already existing registered device class pointer out of its own defined module class ? No one knows how to do ?
    Looks like its not triva ..but dissapapoiting !

  • powerpenguin

    Is there an alternative Forum URL where i can find Linux Guru Level Kernel Module Know How.. Looks like you will not get any answer if you are not a platinum sponser like my company is :-)

  • powerpenguin

    Oh a good hint for the "Security Architects" Kernel module classes schuld only communicate by user space, but hidraw input module e.g keybord is dowing nearly same i want in my kernel module.. now one knows how it grabs the dev of the /dev/hidraw x ? By self registers a own class. I have Plattform module class !


Upcoming Training