On 29.04.19 09:03, Esben Haabendal wrote: > Why not simply replace iobase, mapbase and mapsize with a struct > resource value instead? That was actually my original goal, when I started this. But the situation is a bit more tricky. Many drivers (especially the old ones) initialize these fields in different ways. And there're many places accessing these fields. Drivers for old devices should be handled w/ great care. I don't have access to all that hardware, so I can't test it. Therefore, I'm trying to move in small steps. One step ahead another. One of my next steps would be factoring out more common operations (eg. mapping, etc) into helpers, up to a point, where someday no driver is accessing these fields directly anymore. Then we could easily move everything into struct resource. On that road, we'd also need to find a way for handling the specialities of the various UPIO_* modes via struct resource. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@xxxxxxxxx -- +49-151-27565287