title: Linux Kernel Module - Creating proc file - proc_root undeclared error
body: <p>I copy and paste code from this URL for creating and reading/writing a proc file using a kernel module and get the error that proc_root is undeclared. This same example is on a few sites so I assume it works. Any ideas why I'd get this error? Does my makefile need something different. Below is my makefile as well:</p>
  
  <p>Example code for a basic proc file creation (direct copy and paste to get initial test done):
  <a href="http://tldp.org/LDP/lkmpg/2.6/html/lkmpg.html#AEN769" rel="noreferrer">http://tldp.org/LDP/lkmpg/2.6/html/lkmpg.html#AEN769</a></p>
  
  <p><strong>Makefile</strong> I'm using:</p>
  
  <pre><code>obj-m    := counter.o
  
  KDIR    := /MY/LINUX/SRC
  
  PWD    := $(shell pwd)
  
  default:
   $(MAKE) ARCH=um -C $(KDIR) SUBDIRS=$(PWD) modules
  </code></pre>