Commit 67a101f573b0cb1043c8c305112113450cb9fdbf

Authored by Anton Vorontsov
Committed by Greg Kroah-Hartman
1 parent bfce7cf686

pstore: Headers should include all stuff they use

Headers should really include all the needed prototypes, types, defines
etc. to be self-contained. This is a long-standing issue, but apparently
the new tracing code unearthed it (SMP=n is also a prerequisite):

In file included from fs/pstore/internal.h:4:0,
                 from fs/pstore/ftrace.c:21:
include/linux/pstore.h:43:15: error: field ‘read_mutex’ has incomplete type

While at it, I also added the following:

linux/types.h -> size_t, phys_addr_t, uXX and friends
linux/spinlock.h -> spinlock_t
linux/errno.h -> Exxxx
linux/time.h -> struct timespec (struct passed by value)
struct module and rs_control forward declaration (passed via pointers).

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 3 changed files with 9 additions and 0 deletions Side-by-side Diff

fs/pstore/internal.h
1 1 #ifndef __PSTORE_INTERNAL_H__
2 2 #define __PSTORE_INTERNAL_H__
3 3  
  4 +#include <linux/types.h>
  5 +#include <linux/time.h>
4 6 #include <linux/pstore.h>
5 7  
6 8 #if NR_CPUS <= 2 && defined(CONFIG_ARM_THUMB)
include/linux/pstore.h
... ... @@ -24,6 +24,10 @@
24 24  
25 25 #include <linux/time.h>
26 26 #include <linux/kmsg_dump.h>
  27 +#include <linux/mutex.h>
  28 +#include <linux/types.h>
  29 +#include <linux/spinlock.h>
  30 +#include <linux/errno.h>
27 31  
28 32 /* types */
29 33 enum pstore_type_id {
... ... @@ -33,6 +37,8 @@
33 37 PSTORE_TYPE_FTRACE = 3,
34 38 PSTORE_TYPE_UNKNOWN = 255
35 39 };
  40 +
  41 +struct module;
36 42  
37 43 struct pstore_info {
38 44 struct module *owner;
include/linux/pstore_ram.h
... ... @@ -24,6 +24,7 @@
24 24 #include <linux/init.h>
25 25  
26 26 struct persistent_ram_buffer;
  27 +struct rs_control;
27 28  
28 29 struct persistent_ram_zone {
29 30 phys_addr_t paddr;