add op_lidstate
[pandora-misc.git] / op_gammatool.c
index cda8e01..224c222 100644 (file)
@@ -1,6 +1,7 @@
 /*
+ * op_gammatool - pandora's LCD gamma adjustment tool
+ *
  * Copyright (c) 2010, GraÅžvydas Ignotas
- * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -245,7 +246,9 @@ int main(int argc, char *argv[])
        }
 
        ret = 0;
-       f = fopen("/sys/devices/platform/omap2_mcspi.1/spi1.1/gamma", "r+");
+       f = fopen("/sys/devices/platform/omapdss/display0/gamma", "r+");
+       if (f == NULL)
+               f = fopen("/sys/devices/platform/omap2_mcspi.1/spi1.1/gamma", "r+");
        if (f != NULL) {
                int *g = gamma;
                rewind(f);