Driver porting: The seq_file interface
Driver porting: The seq_file interface
Posted Dec 14, 2013 15:15 UTC (Sat) by Lieta (guest, #94383)In reply to: Driver porting: The seq_file interface by iw2lsi
Parent article: Driver porting: The seq_file interface
At the end of file it calls stop, then start, followed by one more stop.
So it works like this:
.start
.stop
---PAGE---
.start
.stop
---PAGE---
...
.stop
.start
.stop
---EOF---
Special case is when the file is empty. Then there are just two calls (not 4): one .start one .stop.
Posted Dec 14, 2013 15:23 UTC (Sat)
by Lieta (guest, #94383)
[Link]
Driver porting: The seq_file interface
.stop(A)
.start
.stop(B)
---EOF---
There is a problem to differ the .stop(A) from .stop(B) when you have to return some resource (e.g. semaphore), that has been taken in .start, back at the end of sequence. The position counter is equal in both (A) and (B), because you are at EOF.
