r4025 - trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/src

graeme at sita.openmoko.org graeme at sita.openmoko.org
Thu Feb 7 16:19:22 CET 2008


Author: graeme
Date: 2008-02-07 16:19:20 +0100 (Thu, 07 Feb 2008)
New Revision: 4025

Modified:
   trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/src/openmoko-panel-bt.c
Log:
Update panel-applet-bt to check for different paths used in 2.6.22.5 and
2.6.24.



Modified: trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/src/openmoko-panel-bt.c
===================================================================
--- trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/src/openmoko-panel-bt.c	2008-02-06 16:08:19 UTC (rev 4024)
+++ trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-bt/src/openmoko-panel-bt.c	2008-02-07 15:19:20 UTC (rev 4025)
@@ -23,6 +23,7 @@
 #include <stdio.h>
 
 #define BT_POWERON_FILENAME "/sys/class/i2c-dev/i2c-0/device/0-0008/gta01-pm-bt.0/power_on"
+#define BT_POWERON_FILENAME2 "/sys/class/i2c-dev/i2c-0/device/0-0008/neo1973-pm-bt.0/power_on"
 
 typedef struct {
   MokoPanelApplet *mokoapplet;
@@ -35,6 +36,7 @@
   FILE * f = fopen(BT_POWERON_FILENAME, "r+");
   int val;
 
+  if (f == NULL) f = fopen(BT_POWERON_FILENAME2, "r+");
   if (f == NULL) return -1;
 
   fscanf(f, "%i", &val);
@@ -47,6 +49,7 @@
 {
   FILE * f = fopen(BT_POWERON_FILENAME, "w");
 
+  if (f == NULL) f = fopen(BT_POWERON_FILENAME2, "w");
   if (f == NULL) return -1;
 
   fprintf(f, "%i\n", val);





More information about the commitlog mailing list