summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/device.c
diff options
context:
space:
mode:
authorTomer Tayar <ttayar@habana.ai>2019-04-10 15:18:46 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2019-04-10 15:18:46 +0300
commite00dac3daaa75fc91ec67f656ca56859075059c8 (patch)
treeba3a4db07127b38484573e63a2fe2cd4acedfcaa /drivers/misc/habanalabs/device.c
parent78e6427b4e7b017951785982f7f97cf64e2d624b (diff)
downloadlinux-e00dac3daaa75fc91ec67f656ca56859075059c8.tar.bz2
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>
Diffstat (limited to 'drivers/misc/habanalabs/device.c')
-rw-r--r--drivers/misc/habanalabs/device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/device.c b/drivers/misc/habanalabs/device.c
index 25bfb093ff26..a88f7be23c7f 100644
--- a/drivers/misc/habanalabs/device.c
+++ b/drivers/misc/habanalabs/device.c
@@ -5,6 +5,8 @@
* All Rights Reserved.
*/
+#define pr_fmt(fmt) "habanalabs: " fmt
+
#include "habanalabs.h"
#include <linux/pci.h>