bbc_envctrl.c (0b28330e39bbe0ffee4c56b09fc415fcec595ea3) | bbc_envctrl.c (61c7a080a5a061c976988fd4b844dfb468dda255) |
---|---|
1/* bbc_envctrl.c: UltraSPARC-III environment control driver. 2 * 3 * Copyright (C) 2001, 2008 David S. Miller (davem@davemloft.net) 4 */ 5 6#include <linux/kthread.h> 7#include <linux/delay.h> 8#include <linux/kmod.h> --- 551 unchanged lines hidden (view full) --- 560int bbc_envctrl_init(struct bbc_i2c_bus *bp) 561{ 562 struct of_device *op; 563 int temp_index = 0; 564 int fan_index = 0; 565 int devidx = 0; 566 567 while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) { | 1/* bbc_envctrl.c: UltraSPARC-III environment control driver. 2 * 3 * Copyright (C) 2001, 2008 David S. Miller (davem@davemloft.net) 4 */ 5 6#include <linux/kthread.h> 7#include <linux/delay.h> 8#include <linux/kmod.h> --- 551 unchanged lines hidden (view full) --- 560int bbc_envctrl_init(struct bbc_i2c_bus *bp) 561{ 562 struct of_device *op; 563 int temp_index = 0; 564 int fan_index = 0; 565 int devidx = 0; 566 567 while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) { |
568 if (!strcmp(op->node->name, "temperature")) | 568 if (!strcmp(op->dev.of_node->name, "temperature")) |
569 attach_one_temp(bp, op, temp_index++); | 569 attach_one_temp(bp, op, temp_index++); |
570 if (!strcmp(op->node->name, "fan-control")) | 570 if (!strcmp(op->dev.of_node->name, "fan-control")) |
571 attach_one_fan(bp, op, fan_index++); 572 } 573 if (temp_index != 0 && fan_index != 0) { 574 kenvctrld_task = kthread_run(kenvctrld, NULL, "kenvctrld"); 575 if (IS_ERR(kenvctrld_task)) { 576 int err = PTR_ERR(kenvctrld_task); 577 578 kenvctrld_task = NULL; --- 17 unchanged lines hidden --- | 571 attach_one_fan(bp, op, fan_index++); 572 } 573 if (temp_index != 0 && fan_index != 0) { 574 kenvctrld_task = kthread_run(kenvctrld, NULL, "kenvctrld"); 575 if (IS_ERR(kenvctrld_task)) { 576 int err = PTR_ERR(kenvctrld_task); 577 578 kenvctrld_task = NULL; --- 17 unchanged lines hidden --- |