]> Devoid-pointer.net GitWeb - KLGD.git/commitdiff
Fix symbol exporting and qualify internal functions as static
authorMichal Malý <madcatxster@devoid-pointer.net>
Sun, 27 Jul 2014 08:31:19 +0000 (10:31 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Sun, 27 Jul 2014 08:31:19 +0000 (10:31 +0200)
klgd.c
klgd.h

diff --git a/klgd.c b/klgd.c
index 4a8535b83a3fae476f3e0d8fe381a298a3801edf..4238fbf222992f38d8322bbedc4e7c503c916e2c 100644 (file)
--- a/klgd.c
+++ b/klgd.c
@@ -21,10 +21,10 @@ struct klgd_main_private {
        int (*send_command_stream)(void *dev_ctx, struct klgd_command_stream *stream);
 };
 
-void klgd_free_stream(struct klgd_command_stream *s);
-void klgd_schedule_update(struct klgd_main *ctx);
+static void klgd_free_stream(struct klgd_command_stream *s);
+static void klgd_schedule_update(struct klgd_main *ctx);
 
-bool klgd_append_stream(struct klgd_command_stream *target, struct klgd_command_stream *source)
+static bool klgd_append_stream(struct klgd_command_stream *target, struct klgd_command_stream *source)
 {
        struct klgd_command **temp;
        size_t idx;
@@ -47,7 +47,7 @@ bool klgd_append_stream(struct klgd_command_stream *target, struct klgd_command_
 /**
  * Called with stream_mlock held
  */
-void klgd_build_command_stream(struct klgd_main_private *priv)
+static void klgd_build_command_stream(struct klgd_main_private *priv)
 {
        const unsigned long now = jiffies;
        size_t idx;
@@ -73,7 +73,7 @@ void klgd_build_command_stream(struct klgd_main_private *priv)
        }
 }
 
-void klgd_delayed_work(struct work_struct *w)
+static void klgd_delayed_work(struct work_struct *w)
 {
        struct delayed_work *dw = container_of(w, struct delayed_work, work);
        struct klgd_main_private *priv = container_of(dw, struct klgd_main_private, work);
@@ -92,7 +92,7 @@ void klgd_delayed_work(struct work_struct *w)
        mutex_unlock(&priv->stream_mlock);
 }
 
-void klgd_free_stream(struct klgd_command_stream *s)
+static void klgd_free_stream(struct klgd_command_stream *s)
 {
        size_t idx;
 
@@ -218,7 +218,7 @@ int klgd_register_plugin(struct klgd_main *ctx, size_t idx, struct klgd_plugin *
        return 0;
 }
 
-void klgd_schedule_update(struct klgd_main *ctx)
+static void klgd_schedule_update(struct klgd_main *ctx)
 {
        struct klgd_main_private *priv = ctx->private;
        const unsigned long now = jiffies;
@@ -248,4 +248,10 @@ void klgd_schedule_update(struct klgd_main *ctx)
                pr_debug("Events: %u, earliest: %lu, now: %lu\n", events, earliest, now);
                queue_delayed_work(priv->wq, &priv->work, earliest - now);
        }
-}
\ No newline at end of file
+}
+
+EXPORT_SYMBOL_GPL(klgd_deinit);
+EXPORT_SYMBOL_GPL(klgd_init);
+EXPORT_SYMBOL_GPL(klgd_notify_commands_sent);
+EXPORT_SYMBOL_GPL(klgd_post_event);
+EXPORT_SYMBOL_GPL(klgd_register_plugin);
diff --git a/klgd.h b/klgd.h
index 98fcb89bbabcc467884fb81972ca9a762e558066..a5161650d1f3d61f2ce54983674239b0b8cf1496 100644 (file)
--- a/klgd.h
+++ b/klgd.h
@@ -33,8 +33,3 @@ void klgd_notify_commands_sent(struct klgd_main *ctx);
 int klgd_post_event(struct klgd_main *ctx, const size_t idx, void *data);
 int klgd_register_plugin(struct klgd_main *ctx, const size_t idx, struct klgd_plugin *plugin);
 
-EXPORT_SYMBOL_GPL(klgd_deinit);
-EXPORT_SYMBOL_GPL(klgd_init);
-EXPORT_SYMBOL_GPL(klgd_notify_commands_sent);
-EXPORT_SYMBOL_GPL(klgd_post_event);
-EXPORT_SYMBOL_GPL(klgd_register_plugin);
\ No newline at end of file