Re: How to get the dentry value - no path_lookup

2015-09-07 Thread Pria Mn
Hi Rohan, I am using 3.10.0-123.el7.x86_64 kernel (RHEL-7). I am trying to obtain 'dentry' value from file path information. For this: earlier I had written the code as below : #if(LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) err= kern_path_parent(tmp,nd); #else err= path_lookup(tmp, 0, nd);

Re: How to get the dentry value - no path_lookup

2015-09-07 Thread Rohan Puri
On Mon, Sep 7, 2015 at 1:11 PM, Pria Mn wrote: > Hi Rohan, > > I am using 3.10.0-123.el7.x86_64 kernel (RHEL-7). I am trying to obtain > 'dentry' value from file path information. For this: earlier I had written > the code as below : > > #if(LINUX_VERSION_CODE >=

Re: How to properly unregister LED class devices?

2015-09-07 Thread Pranay Srivastava
On Sun, Sep 6, 2015 at 11:18 PM, Clément Vuchener wrote: > Hello, > > I am trying to write a driver that uses LED class devices using works for > setting the LED brightness but I am not sure of how to unregister the devices. > > I have been using code like this: >

Re: How to get the dentry value - no path_lookup

2015-09-07 Thread Rohan Puri
On Mon, Sep 7, 2015 at 12:10 PM, Pria Mn wrote: > Hi, > > > > I happened to come across the below discussion. > > > > http://lists.kernelnewbies.org/pipermail/kernelnewbies/2012-August/005914.html > > > I am having a similar issue. > > I am using Rhel7-3.10.0-123 > > kernel.

How to get the dentry value - no path_lookup

2015-09-07 Thread Pria Mn
Hi, I happened to come across the below discussion. http://lists.kernelnewbies.org/pipermail/kernelnewbies/2012-August/005914.html I am having a similar issue. I am using Rhel7-3.10.0-123 kernel. I tried all the options that are mentioned above and none of the api's including kern_path()

Re: How to properly unregister LED class devices?

2015-09-07 Thread Clément Vuchener
On Mon, Sep 07, 2015 at 12:08:17PM +0530, Pranay Srivastava wrote: > On Sun, Sep 6, 2015 at 11:18 PM, Clément Vuchener > wrote: > > Hello, > > > > I am trying to write a driver that uses LED class devices using works for > > setting the LED brightness but I am not

Re: How to properly unregister LED class devices?

2015-09-07 Thread Clément Vuchener
On Mon, Sep 07, 2015 at 05:17:09PM +0530, Pranay Srivastava wrote: > On Mon, Sep 7, 2015 at 4:58 PM, Jacek Anaszewski > wrote: > > Hi Clément, > > > > > > On 09/07/2015 11:05 AM, Clément Vuchener wrote: > >> > >> On Mon, Sep 07, 2015 at 12:08:17PM +0530, Pranay

USB error codes and usbmon

2015-09-07 Thread alx741
Kernel newbies community, I'm writing a simple usb device implementation using PIC microcontroller and using USBMON to debug, i've properly receive the very first GET_DESCRIPTOR request and try to send the device descriptor to the host and it seems not to be working, but the USBMON and dmesg

Re: How to properly unregister LED class devices?

2015-09-07 Thread Pranay Srivastava
On Mon, Sep 7, 2015 at 5:53 PM, Clément Vuchener wrote: > On Mon, Sep 07, 2015 at 05:17:09PM +0530, Pranay Srivastava wrote: >> On Mon, Sep 7, 2015 at 4:58 PM, Jacek Anaszewski >> wrote: >> > Hi Clément, >> > >> > >> > On 09/07/2015 11:05 AM,

Re: How to get the dentry value - no path_lookup

2015-09-07 Thread Valdis . Kletnieks
On Mon, 07 Sep 2015 12:10:56 +0530, Pria Mn said: > return valid dentry value. My requirement is to fetch directory name from > filepath. First off, unless this is a class assignment, your *requirement* isn't to fetch a directory name. Fetching the directory name is a *solution* you're thinking

Re: How to properly unregister LED class devices?

2015-09-07 Thread Pranay Srivastava
On Mon, Sep 7, 2015 at 4:58 PM, Jacek Anaszewski wrote: > Hi Clément, > > > On 09/07/2015 11:05 AM, Clément Vuchener wrote: >> >> On Mon, Sep 07, 2015 at 12:08:17PM +0530, Pranay Srivastava wrote: >>> >>> On Sun, Sep 6, 2015 at 11:18 PM, Clément Vuchener >>>

Re: How to get the dentry value - no path_lookup

2015-09-07 Thread Rohan Puri
On 7 Sep 2015 23:25, wrote: > > On Mon, 07 Sep 2015 12:10:56 +0530, Pria Mn said: > > > return valid dentry value. My requirement is to fetch directory name from > > filepath. > > First off, unless this is a class assignment, your *requirement* isn't > to fetch a