common: Drop linux/printk.h from common header
This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h
Move this out of the common header and include it only where needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index e488caa..2ef8fde 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -81,6 +81,7 @@
#include <div64.h>
#include <linux/bug.h>
#include <linux/err.h>
+#include <linux/printk.h>
#endif
#include <linux/math64.h>
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 3ac0b19..a1941b8 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -33,6 +33,7 @@
#else
#include <linux/bug.h>
#include <linux/log2.h>
+#include <linux/printk.h>
#endif
#include <linux/err.h>
#include <ubi_uboot.h>
diff --git a/drivers/mtd/ubi/debug.c b/drivers/mtd/ubi/debug.c
index d2b7ca5..b119cb6 100644
--- a/drivers/mtd/ubi/debug.c
+++ b/drivers/mtd/ubi/debug.c
@@ -8,6 +8,7 @@
#include <hexdump.h>
#include <malloc.h>
#include <ubi_uboot.h>
+#include <linux/printk.h>
#include "ubi.h"
#ifndef __UBOOT__
#include <linux/debugfs.h>
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h
index 9c8ce51..2e13ebb 100644
--- a/drivers/mtd/ubi/debug.h
+++ b/drivers/mtd/ubi/debug.h
@@ -17,6 +17,7 @@
#endif
#include <hexdump.h>
+#include <linux/printk.h>
#ifndef __UBOOT__
#define ubi_assert(expr) do { \
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index f449601..1759888 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -28,6 +28,7 @@
#include <asm/pgtable.h>
#else
#include <ubi_uboot.h>
+#include <linux/printk.h>
#endif
#include <linux/mtd/mtd.h>
#include <linux/mtd/ubi.h>