From: Randy Dunlap <rdunlap@infradead.org>
To: linux-media <linux-media@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: [PATCH -next] media/platform/cadence: add <linux/slab.h> to fix build error
Date: Fri, 8 Jun 2018 14:19:06 -0700 [thread overview]
Message-ID: <2feda2a7-8008-f36d-67fa-a4aa38ea75ae@infradead.org> (raw)
From: Randy Dunlap <rdunlap@infradead.org>
Add #include <linux/slab.h> to fix build errors.
This driver uses kzalloc() and kfree() so it needs to #include
the appropriate header file for those interfaces.
Fixes these build errors:
../drivers/media/platform/cadence/cdns-csi2rx.c: In function 'csi2rx_probe':
../drivers/media/platform/cadence/cdns-csi2rx.c:421:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
csi2rx = kzalloc(sizeof(*csi2rx), GFP_KERNEL);
../drivers/media/platform/cadence/cdns-csi2rx.c:421:9: warning: assignment makes pointer from integer without a cast [enabled by default]
csi2rx = kzalloc(sizeof(*csi2rx), GFP_KERNEL);
../drivers/media/platform/cadence/cdns-csi2rx.c:466:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
kfree(csi2rx);
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
---
drivers/media/platform/cadence/cdns-csi2rx.c | 1 +
1 file changed, 1 insertion(+)
--- linux-next-20180608.orig/drivers/media/platform/cadence/cdns-csi2rx.c
+++ linux-next-20180608/drivers/media/platform/cadence/cdns-csi2rx.c
@@ -13,6 +13,7 @@
#include <linux/of_graph.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
+#include <linux/slab.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
next reply other threads:[~2018-06-08 21:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 21:19 Randy Dunlap [this message]
2018-06-11 7:36 ` [PATCH -next] media/platform/cadence: add <linux/slab.h> to fix build error Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2feda2a7-8008-f36d-67fa-a4aa38ea75ae@infradead.org \
--to=rdunlap@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=maxime.ripard@bootlin.com \
--cc=mchehab@kernel.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox