title: How to attach to device context in another driver at Linux
body: <p>Example: I use sensor TMP421 which driver is linux/drivers/hwmon/tmp421.c. It will export to /sys/class/hwmon/hwon0/.... And user can use <code>cat</code> command to read the temperatures. But my is request: I want to read it at kernel space to control some thing when the temperature reach to MAX values (example).</p>
  
  <p>So how I can attach to get the device context to use the function </p>
  
  <pre><code>tmp421_data *tmp421_update_device(struct device *dev)
  </code></pre>
  
  <p>to read the temperature ?</p>
  
  <p>Or is there another way ? 
  I don't want to use the cat command at my code.</p>
  
  <p>Thanks</p>