imajor()/iminor() should be used instead of accessing r_dev directly.
Based on patch from Eric Sesterhenn (snakebyte@gmx.de).
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
o Switch to dynamic major
o Remove duplicate SHN_MIPS_SCOMMON definition
o Coding style: remove typedefs.
o Coding style: reorder to avoid the need for forward declarations
o Use kzalloc.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>