Using shorter paths to the Openmoko devices
This commit is contained in:
parent
83e274cc87
commit
3c0026a7ca
@ -226,17 +226,15 @@ static int _event_mixer_set(PhonePlugin * plugin, char const * filename)
|
|||||||
static int _event_power_on(PhonePlugin * plugin, gboolean power)
|
static int _event_power_on(PhonePlugin * plugin, gboolean power)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
char const path1[] = "/sys/bus/platform/drivers/gta02-pm-gsm"
|
char const p1[] = "/sys/bus/platform/devices/gta02-pm-gsm.0/power_on";
|
||||||
"/gta02-pm-gsm.0/power_on";
|
char const p2[] = "/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on";
|
||||||
char const path2[] = "/sys/bus/platform/drivers/neo1973-pm-gsm"
|
char const * path = p1;
|
||||||
"/neo1973-pm-gsm.0/power_on";
|
|
||||||
char const * path = path1;
|
|
||||||
int fd;
|
int fd;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
||||||
if((fd = open(path, O_WRONLY)) < 0)
|
if((fd = open(path, O_WRONLY)) < 0)
|
||||||
{
|
{
|
||||||
path = path2;
|
path = p2;
|
||||||
fd = open(path, O_WRONLY);
|
fd = open(path, O_WRONLY);
|
||||||
}
|
}
|
||||||
if(fd < 0)
|
if(fd < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user