Re: error from sysfs while reading attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 22, 2006 at 08:32:18PM +0530, pradeep singh wrote:
> On 3/22/06, pradeep singh <2500.pradeep@xxxxxxxxx> wrote:
> > > Use the proper DEV_ATTR() macro intead of trying to roll your own.  And,
> > > I bet you get a compiler warning when the code above compiles, do not
> > > ignore it, it is pointing out your error...
> > >
> > > thanks,
> > >
> > > greg k-h
> 
> It works greg. Thanks a lot greg.
> Atleast kernel doesnot panics even though cat still gives me nothing :(.
> But can i ask what is wrong if we try initialising the attribute
> traditional way without using the DEVICE_ATTR macro?

"Traditionally" you should not be creating dynamic attributes on the
fly.  It's hard to do correctly, and easy to get wrong, as you proved :)

> Why am  i getting a kernel panic on rmmod? :(

Without your whole kernel module source, and the exact error you are
getting, it's very hard to determine this.

good luck,

greg k-h

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux