]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/marker.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[linux-2.6-omap-h63xx.git] / kernel / marker.c
index 05a25776f71fe4f802971323f3144733a8c14d8d..e9c6b2bc9400627cf183382ee55933333f0ee83b 100644 (file)
@@ -62,7 +62,7 @@ struct marker_entry {
        int refcount;   /* Number of times armed. 0 if disarmed. */
        struct rcu_head rcu;
        void *oldptr;
-       unsigned char rcu_pending:1;
+       int rcu_pending;
        unsigned char ptype:1;
        char name[0];   /* Contains name'\0'format'\0' */
 };
@@ -653,11 +653,17 @@ int marker_probe_register(const char *name, const char *format,
        entry = get_marker(name);
        if (!entry) {
                entry = add_marker(name, format);
-               if (IS_ERR(entry)) {
+               if (IS_ERR(entry))
                        ret = PTR_ERR(entry);
-                       goto end;
-               }
+       } else if (format) {
+               if (!entry->format)
+                       ret = marker_set_format(&entry, format);
+               else if (strcmp(entry->format, format))
+                       ret = -EPERM;
        }
+       if (ret)
+               goto end;
+
        /*
         * If we detect that a call_rcu is pending for this marker,
         * make sure it's executed now.