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

device class related



Hi:

 

I am using linux 2.6.12, and I have created a device class and several device attributes which only support “read” and all this is working fine. I created a new attr with a store function which resulted in a file with the write mode set:

 

static CLASS_DEVICE_ATTR(portstate, S_IWUSR, NULL, store_portstate);

 

When I write to the file called ‘portstate’ in the sys/class/<device>/ directory as follows:

  From the linux shell I do: echo 1 > portstate

  

 

it appears as though the store_portstate function is getting called in an infinite loop!

What causes this?

 

Thanks a lot in advance,

Suri