question about how to use linux driver
Hello,
Since linux is file-oriented. Everytime, I want to operate a device, I need to open and close the dev file. Is it good? For example, my application needs to kick the watchdog timer. in my function to kick, I open the dev file, ioctl to kick it and close the file at the end.
I know it works. But I don't think it's good to open/close everytime. I'm wandering how much resource it waste to open/close the file each time? If my harddisk is working very busyily, will the open function be delayed?
I open/close everytime because it's one function. It's easy to be used by other users.
Thanks
|