]> git.baikalelectronics.ru Git - kernel.git/commit
[MTD] fix dataflash 64-bit divisions
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 18 Dec 2008 12:09:56 +0000 (14:09 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 19 Dec 2008 16:23:18 +0000 (16:23 +0000)
commit23c5cc9ea35ff6f875c6967a102fab8e12a7163b
tree03bbc9e2f01cf3ed6d0891700ae3c4c14a429332
parent94bbe06923fe267abf48b0626a97a381f548668f
[MTD] fix dataflash 64-bit divisions

MTD has recently been upgraded for 64-bit support, see commit
number da10041e3714813bc8efc7ab066a64b8dd2100f7 in the
mtd-2.6.git tree (git://git.infradead.org/mtd-2.6.git)
or see this URL:
http://git.infradead.org/mtd-2.6.git?a=commit;h=da10041e3714813bc8efc7ab066a64b8dd2100f7

Some variables in MTD data structures which were 32-bit
became 64-bit. Namely, the 'size' field in 'struct mtd_info'
and the 'addr'/'len' fields in 'struct erase_info'. This
means we have to use 'do_div' to divide them.

This patch fixes the following linking error:
ERROR: "__udivdi3" [drivers/mtd/devices/mtd_dataflash.ko] undefined!
ERROR: "__umoddi3" [drivers/mtd/devices/mtd_dataflash.ko] undefined!

This patch changes divisions of 64-bit variable so that they use
'do_div'. This patch also change some print placeholders to
get rid of gcc warnings.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Nicolas Pitre <nico@cam.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/mtd_dataflash.c