Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242796
b: refs/heads/master
c: f27def0
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Mar 26, 2011
1 parent 13bdba6 commit 708dba0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2740c60c4ab9a8c6169d7925014f57440361f698
refs/heads/master: f27def07bfb296d5eb441cd5777d351c7afcb4a1
36 changes: 30 additions & 6 deletions trunk/drivers/hwmon/f71882fg.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,28 @@ static const char f71882fg_has_beep[] = {
[f8000] = 0,
};

static const char f71882fg_nr_fans[] = {
[f71808e] = 3,
[f71858fg] = 3,
[f71862fg] = 3,
[f71869] = 3,
[f71882fg] = 4,
[f71889fg] = 3,
[f71889ed] = 3,
[f8000] = 3,
};

static const char f71882fg_nr_temps[] = {
[f71808e] = 2,
[f71858fg] = 3,
[f71862fg] = 3,
[f71869] = 3,
[f71882fg] = 3,
[f71889fg] = 3,
[f71889ed] = 3,
[f8000] = 3,
};

static struct platform_device *f71882fg_pdev;

/* Super-I/O Function prototypes */
Expand Down Expand Up @@ -1071,9 +1093,9 @@ static u16 f71882fg_read_temp(struct f71882fg_data *data, int nr)
static struct f71882fg_data *f71882fg_update_device(struct device *dev)
{
struct f71882fg_data *data = dev_get_drvdata(dev);
int nr_fans = f71882fg_nr_fans[data->type];
int nr_temps = f71882fg_nr_temps[data->type];
int nr, reg, point;
int nr_fans = (data->type == f71882fg) ? 4 : 3;
int nr_temps = (data->type == f71808e) ? 2 : 3;

mutex_lock(&data->update_lock);

Expand Down Expand Up @@ -2042,8 +2064,9 @@ static int __devinit f71882fg_probe(struct platform_device *pdev)
{
struct f71882fg_data *data;
struct f71882fg_sio_data *sio_data = pdev->dev.platform_data;
int err, i, nr_fans = (sio_data->type == f71882fg) ? 4 : 3;
int nr_temps = (sio_data->type == f71808e) ? 2 : 3;
int nr_fans = f71882fg_nr_fans[sio_data->type];
int nr_temps = f71882fg_nr_temps[sio_data->type];
int err, i;
u8 start_reg, reg;

data = kzalloc(sizeof(struct f71882fg_data), GFP_KERNEL);
Expand Down Expand Up @@ -2276,8 +2299,9 @@ static int __devinit f71882fg_probe(struct platform_device *pdev)
static int f71882fg_remove(struct platform_device *pdev)
{
struct f71882fg_data *data = platform_get_drvdata(pdev);
int i, nr_fans = (data->type == f71882fg) ? 4 : 3;
int nr_temps = (data->type == f71808e) ? 2 : 3;
int nr_fans = f71882fg_nr_fans[data->type];
int nr_temps = f71882fg_nr_temps[data->type];
int i;
u8 start_reg = f71882fg_read8(data, F71882FG_REG_START);

if (data->hwmon_dev)
Expand Down

0 comments on commit 708dba0

Please sign in to comment.