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

Re: device class related



Hi,

Suresh Shelvapille a écrit :

> it appears as though the store_portstate function is getting called in an 
> infinite loop!
> 
> What causes this?

I'm not an expert of the device infrastructure of the Linux kernel, but
I suspect it's because you don't return the number of bytes that you
have taken into account.

The store() method has the following prototype:

ssize_t (*store)(struct class_device *, const char * buf, size_t count);

So you must return the number of bytes that have been written.

Sincerly,

Thomas
-- 
Thomas Petazzoni
thomas.petazzoni@xxxxxxxx


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