OSDN Git Service

Input: matrix_keypad - replace header inclusions by forward declarations
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 24 Oct 2022 12:34:14 +0000 (05:34 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 24 Feb 2023 06:12:47 +0000 (22:12 -0800)
When the data structure is only referred by pointer, compiler may not need
to see the contents of the data type. Thus, we may replace header inclusions
by respective forward declarations.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220923184632.2157-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
include/linux/input/matrix_keypad.h

index 9476768..b8d8d69 100644 (file)
@@ -3,8 +3,9 @@
 #define _MATRIX_KEYPAD_H
 
 #include <linux/types.h>
-#include <linux/input.h>
-#include <linux/of.h>
+
+struct device;
+struct input_dev;
 
 #define MATRIX_MAX_ROWS                32
 #define MATRIX_MAX_COLS                32