Lines Matching refs:bp
445 static void attach_one_temp(struct bbc_i2c_bus *bp, struct platform_device *op, in attach_one_temp() argument
457 tp->client = bbc_i2c_attach(bp, op); in attach_one_temp()
467 list_add(&tp->bp_list, &bp->temps); in attach_one_temp()
493 static void attach_one_fan(struct bbc_i2c_bus *bp, struct platform_device *op, in attach_one_fan() argument
505 fp->client = bbc_i2c_attach(bp, op); in attach_one_fan()
514 list_add(&fp->bp_list, &bp->fans); in attach_one_fan()
537 static void destroy_all_temps(struct bbc_i2c_bus *bp) in destroy_all_temps() argument
541 list_for_each_entry_safe(tp, tpos, &bp->temps, bp_list) { in destroy_all_temps()
554 static void destroy_all_fans(struct bbc_i2c_bus *bp) in destroy_all_fans() argument
558 list_for_each_entry_safe(fp, fpos, &bp->fans, bp_list) { in destroy_all_fans()
565 int bbc_envctrl_init(struct bbc_i2c_bus *bp) in bbc_envctrl_init() argument
572 while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) { in bbc_envctrl_init()
574 attach_one_temp(bp, op, temp_index++); in bbc_envctrl_init()
576 attach_one_fan(bp, op, fan_index++); in bbc_envctrl_init()
584 destroy_all_temps(bp); in bbc_envctrl_init()
585 destroy_all_fans(bp); in bbc_envctrl_init()
593 void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp) in bbc_envctrl_cleanup() argument
598 destroy_all_temps(bp); in bbc_envctrl_cleanup()
599 destroy_all_fans(bp); in bbc_envctrl_cleanup()