habanalabs: Cancel pr_fmt() definition dependency on includes order
authorTomer Tayar <ttayar@habana.ai>
Wed, 10 Apr 2019 12:18:46 +0000 (15:18 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Wed, 10 Apr 2019 12:18:46 +0000 (15:18 +0300)
commite00dac3daaa75fc91ec67f656ca56859075059c8
treeba3a4db07127b38484573e63a2fe2cd4acedfcaa
parent78e6427b4e7b017951785982f7f97cf64e2d624b
habanalabs: Cancel pr_fmt() definition dependency on includes order

pr_fmt() should be defined before including linux/printk.h, either
directly or indirectly, in order to avoid redefinition of the macro.
Currently the macro definition is in habanalabs.h, which is included in
many files, and that makes the addition/reorder of includes to be prone
to compilation errors.
This patch cancels this dependency by defining the macro only in the few
source files that use it.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/device.c
drivers/misc/habanalabs/habanalabs.h
drivers/misc/habanalabs/habanalabs_drv.c