~ubuntu-branches/ubuntu/quantal/linux-lowlatency/quantal-proposed

« back to all changes in this revision

Viewing changes to drivers/hwmon/lm75.h

  • Committer: Package Import Robot
  • Author(s): Andy Whitcroft, Andy Whitcroft
  • Date: 2012-06-21 09:16:38 UTC
  • Revision ID: package-import@ubuntu.com-20120621091638-gubhv4nox8xez1ct
Tags: 3.5.0-1.1
[ Andy Whitcroft]

* Rebuild lowlatency against Ubuntu-3.5.0-1.1
* All new configuration system to allow configuration deltas to be
  exposed via debian.lowlatency/config-delta

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
    lm75.h - Part of lm_sensors, Linux kernel modules for hardware
3
 
             monitoring
 
3
              monitoring
4
4
    Copyright (c) 2003 Mark M. Hoffman <mhoffman@lightlink.com>
5
5
 
6
6
    This program is free software; you can redistribute it and/or modify
37
37
static inline u16 LM75_TEMP_TO_REG(long temp)
38
38
{
39
39
        int ntemp = SENSORS_LIMIT(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
40
 
        ntemp += (ntemp<0 ? -250 : 250);
 
40
        ntemp += (ntemp < 0 ? -250 : 250);
41
41
        return (u16)((ntemp / 500) << 7);
42
42
}
43
43
 
47
47
           guarantee arithmetic shift and preserve the sign */
48
48
        return ((s16)reg / 128) * 500;
49
49
}
50