]> 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)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:19 +0000 (08:35 +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);