]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/arm-ds5-gator.git/blobdiff - driver/gator_events_mmaped.c
gator: Version 5.14
[android-sdk/arm-ds5-gator.git] / driver / gator_events_mmaped.c
index c4cb44f256205f2b2736124916c1b7dd14676ce6..0027564ea4d4cf1b1ce5309cc05d2312aabccc52 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Example events provider
  *
- * Copyright (C) ARM Limited 2010-2012. All rights reserved.
+ * Copyright (C) ARM Limited 2010-2013. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -141,7 +141,7 @@ static int mmaped_simulate(int counter, int delta_in_us)
                break;
        case 2:         /* PWM signal */
                {
-                       static int t, dc, x;
+                       static int dc, x, t = 0;
 
                        t += delta_in_us;
                        if (t > 1000000)
@@ -170,7 +170,7 @@ static int gator_events_mmaped_read(int **buffer)
 #endif
 
        /* System wide counters - read from one core only */
-       if (smp_processor_id())
+       if (!on_primary_core())
                return 0;
 
 #ifndef TODO