MTD pointer alignment

Gavin Lambert
2006-11-29T00:09:28Z

Given that mtdchar assumes that it can mess with the low 2 bits of the
MTD pointer it keeps around with impunity, add_mtd_device in mtdcore.c
should probably refuse to add any MTD device pointer that doesn't fall
on a 4-byte boundary.

As of kernel 2.6.15, at least, it happily adds it, leading to much
weirdness if the pointer wasn't actually aligned that way (which can
happen if it's embedded in a structure -- since struct mtd_info starts
with a byte-sized field then by default the structure as a whole is
allowed to be byte aligned).