[oclug] Linux Driver Questions

Jon Masters jonathan at jonmasters.org
Thu Mar 10 17:17:07 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

FARHAT UNNISA wrote:

|   Can anyone explain me what map_word is in map.h. It is described as a
|   "typedef union" but I am not able to udnerstand the logic behind it.

Please check which header you're refering to next time, the only map.h I
can think of lives in linux/mtd/map.h, which lxr just confirmed.

Wrapping data types up is typically done for two reasons:

	* enforcing alignment.
	* enforcing abstraction.

I'm not an MTD expert (and I've not checked the documentation before
sending this, but I'd advise that's the best place to go for help), but
I'd guess the reason was to create a more opaque type and force you to
use the accessor functions provided.

oclug is probably not the best place to be asking this, try
http://www.kernelnewbies.org/ or another kernel site.

Jon.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCMMdjeTyyexZHHxERAsK9AJ44sN723NfS79K4W4+uvg04+zd9SQCfU7QZ
jBXO7t5BvQW1W+CztHO1rS8=
=OiPZ
-----END PGP SIGNATURE-----


More information about the OCLUG mailing list