~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/hwmon/g760a.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
    Copyright (C) 2007  Herbert Valerio Riedel <hvr@gnu.org>
6
6
 
7
7
    Complete datasheet is available at GMT's website:
8
 
      http://www.gmt.com.tw/datasheet/g760a.pdf
 
8
      http://www.gmt.com.tw/product/datasheet/EDS-760A.pdf 
9
9
 
10
10
    This program is free software; you can redistribute it and/or modify
11
11
    it under the terms of the GNU General Public License as published by
68
68
#define PWM_FROM_CNT(cnt)       (0xff-(cnt))
69
69
#define PWM_TO_CNT(pwm)         (0xff-(pwm))
70
70
 
71
 
unsigned int rpm_from_cnt(u8 val, u32 clk, u16 div)
 
71
static inline unsigned int rpm_from_cnt(u8 val, u32 clk, u16 div)
72
72
{
73
73
        return ((val == 0x00) ? 0 : ((clk*30)/(val*div)));
74
74
}
236
236
        sysfs_remove_group(&client->dev.kobj, &g760a_group);
237
237
error_sysfs_create_group:
238
238
        kfree(data);
239
 
        i2c_set_clientdata(client, NULL);
240
239
 
241
240
        return err;
242
241
}
247
246
        hwmon_device_unregister(data->hwmon_dev);
248
247
        sysfs_remove_group(&client->dev.kobj, &g760a_group);
249
248
        kfree(data);
250
 
        i2c_set_clientdata(client, NULL);
251
249
 
252
250
        return 0;
253
251
}