blockdev.h: Convery macros to static inlines to remove compiling errors

see https://lkml.org/lkml/2012/1/11/467 for the origional patch