diff mbox series

[v2] drm: shmobile: Reduce include dependencies

Message ID 20200205093226.72064-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [v2] drm: shmobile: Reduce include dependencies | expand

Commit Message

Andy Shevchenko Feb. 5, 2020, 9:32 a.m. UTC
This file doesn't need everything provided by <linux/kernel.h>.
All it needs are some types, which are provided by <linux/types.h>.

Note, <drm/drm_mode.h> already includes <linux/types.h>, but
not relying on implicit includes is indeed a good thing.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: Update commit message (Geert, Laurent)
 include/linux/platform_data/shmob_drm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko Feb. 6, 2020, 11:04 a.m. UTC | #1
On Wed, Feb 05, 2020 at 07:33:22PM +0200, Laurent Pinchart wrote:
> Hi Andy,
> 
> Thank you for the patch.
> 
> On Wed, Feb 05, 2020 at 11:32:26AM +0200, Andy Shevchenko wrote:
> > This file doesn't need everything provided by <linux/kernel.h>.
> > All it needs are some types, which are provided by <linux/types.h>.
> > 
> > Note, <drm/drm_mode.h> already includes <linux/types.h>, but
> > not relying on implicit includes is indeed a good thing.
> 
> Do we even need linux/types.h ? Apart from struct drm_mode_modeinfo,
> shmob_drm.h seems to only contain plain C without using any externally
> defined types.

Good point. It doesn't contain neither bool nor uXX or alike types.
Probably we may simple drop the inclusion. I'll send v3.
diff mbox series

Patch

diff --git a/include/linux/platform_data/shmob_drm.h b/include/linux/platform_data/shmob_drm.h
index fe815d7d9f58..08605fdb2226 100644
--- a/include/linux/platform_data/shmob_drm.h
+++ b/include/linux/platform_data/shmob_drm.h
@@ -10,7 +10,7 @@ 
 #ifndef __SHMOB_DRM_H__
 #define __SHMOB_DRM_H__
 
-#include <linux/kernel.h>
+#include <linux/types.h>
 
 #include <drm/drm_mode.h>