vmstat_text is only available when PROC_FS or SYSFS is enabled. This
causes build errors in drivers/base/node.c when they are both disabled:
drivers/built-in.o: In function `node_read_vmstat':
node.c:(.text+0x10e28f): undefined reference to `vmstat_text'
Rather than litter drivers/base/node.c with #ifdef/#endif around the
affected lines of code, add macros for optional sysdev attributes so that
those lines of code will be ignored, without using #ifdef/#endif in the .c
file(s). I.e., the ifdeffery is done only in a header file with
sysdev_create_file_optional() and sysdev_remove_file_optional().
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Amerigo Wang <amwang@redhat.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>