]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00221450 imx6 thermal: add sys_close() in cooling device
authorRong Dian <b38775@freescale.com>
Mon, 27 Aug 2012 03:27:06 +0000 (11:27 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:12:51 +0000 (14:12 +0200)
add sys_close() to close opened file in cooling device

Signed-off-by: Rong Dian <b38775@freescale.com>
drivers/mxc/thermal/cooling.c

index 31188f01ffab76264a73cc4596b902d8103c2afc..7019d9949c8ad95e31c1f77890fdb5f09d72883b 100644 (file)
@@ -178,6 +178,7 @@ int anatop_thermal_cpu_hotplug(bool cpu_on)
                                        sys_write(fd, (char *)"1", MAX_CPU_ONLINE_LEN);
                                        cpu_mask &= ~(0x1 << cpu);
                                        ret = 0;
+                                       sys_close(fd);
                                        break;
                                }
                                sys_close(fd);
@@ -199,6 +200,7 @@ int anatop_thermal_cpu_hotplug(bool cpu_on)
                                        sys_write(fd, (char *)"0", MAX_CPU_ONLINE_LEN);
                                        cpu_mask |= 0x1 << cpu;
                                        ret = 0;
+                                       sys_close(fd);
                                        break;
                                }
                                sys_close(fd);