It's right API a bit misused (to allow your request to use fields by
name)
i.e. foo = readl((unsigned long)®s->bar);
vs a wrong API that need a cast to be used correctly
i.e. rme9652->iobase = (unsigned long) ioremap(rme9652->port,
RME9652_IO_EXTENT);
Taken in account that the main point is to not have fake pointers here
and there, my choice would be obvious.
> One could argue btw that structure offsets are less error prone to
> code than register offset defines out the wazoo.
offset defines are never correct on some architecture while being
incorrect on some other, that's the whole point: a wrong #define is
likely squashed during the very first phase of driver development.
-- Abramo Bagnara mailto:abramo@alsa-project.orgOpera Unica Phone: +39.546.656023 Via Emilia Interna, 140 48014 Castel Bolognese (RA) - Italy
ALSA project http://www.alsa-project.org It sounds good! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/