mmc: dw_mmc: fix the max_blk_count in IDMAC
[firefly-linux-kernel-4.4.55.git] / drivers / gator / gator_events_mali_common.c
index 4f2cce4ce67bda42e47156ed7d31c343b960137a..7741f257554260087ea7e70a7742560fbb184727 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Copyright (C) ARM Limited 2012-2014. All rights reserved.
+ * Copyright (C) ARM Limited 2012-2015. 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
@@ -8,7 +8,7 @@
  */
 #include "gator_events_mali_common.h"
 
-extern int gator_mali_create_file_system(const char *mali_name, const char *event_name, struct super_block *sb, struct dentry *root, mali_counter *counter, unsigned long *event)
+extern int gator_mali_create_file_system(const char *mali_name, const char *event_name, struct super_block *sb, struct dentry *root, struct mali_counter *counter, unsigned long *event)
 {
        int err;
        char buf[255];
@@ -17,36 +17,39 @@ extern int gator_mali_create_file_system(const char *mali_name, const char *even
        /* If the counter name is empty ignore it */
        if (strlen(event_name) != 0) {
                /* Set up the filesystem entry for this event. */
-               snprintf(buf, sizeof(buf), "ARM_%s_%s", mali_name, event_name);
+               if (mali_name == NULL)
+                       snprintf(buf, sizeof(buf), "ARM_Mali-%s", event_name);
+               else
+                       snprintf(buf, sizeof(buf), "ARM_Mali-%s_%s", mali_name, event_name);
 
                dir = gatorfs_mkdir(sb, root, buf);
 
                if (dir == NULL) {
-                       pr_debug("gator: %s: error creating file system for: %s (%s)", mali_name, event_name, buf);
+                       pr_debug("gator: %s: error creating file system for: %s (%s)\n", mali_name, event_name, buf);
                        return -1;
                }
 
                err = gatorfs_create_ulong(sb, dir, "enabled", &counter->enabled);
                if (err != 0) {
-                       pr_debug("gator: %s: error calling gatorfs_create_ulong for: %s (%s)", mali_name, event_name, buf);
+                       pr_debug("gator: %s: error calling gatorfs_create_ulong for: %s (%s)\n", mali_name, event_name, buf);
                        return -1;
                }
                err = gatorfs_create_ro_ulong(sb, dir, "key", &counter->key);
                if (err != 0) {
-                       pr_debug("gator: %s: error calling gatorfs_create_ro_ulong for: %s (%s)", mali_name, event_name, buf);
+                       pr_debug("gator: %s: error calling gatorfs_create_ro_ulong for: %s (%s)\n", mali_name, event_name, buf);
                        return -1;
                }
                if (counter->cores != -1) {
                        err = gatorfs_create_ro_ulong(sb, dir, "cores", &counter->cores);
                        if (err != 0) {
-                               pr_debug("gator: %s: error calling gatorfs_create_ro_ulong for: %s (%s)", mali_name, event_name, buf);
+                               pr_debug("gator: %s: error calling gatorfs_create_ro_ulong for: %s (%s)\n", mali_name, event_name, buf);
                                return -1;
                        }
                }
                if (event != NULL) {
                        err = gatorfs_create_ulong(sb, dir, "event", event);
                        if (err != 0) {
-                               pr_debug("gator: %s: error calling gatorfs_create_ro_ulong for: %s (%s)", mali_name, event_name, buf);
+                               pr_debug("gator: %s: error calling gatorfs_create_ro_ulong for: %s (%s)\n", mali_name, event_name, buf);
                                return -1;
                        }
                }
@@ -55,12 +58,12 @@ extern int gator_mali_create_file_system(const char *mali_name, const char *even
        return 0;
 }
 
-extern void gator_mali_initialise_counters(mali_counter counters[], unsigned int n_counters)
+extern void gator_mali_initialise_counters(struct mali_counter counters[], unsigned int n_counters)
 {
        unsigned int cnt;
 
        for (cnt = 0; cnt < n_counters; cnt++) {
-               mali_counter *counter = &counters[cnt];
+               struct mali_counter *counter = &counters[cnt];
 
                counter->key = gator_events_get_key();
                counter->enabled = 0;