From: Michal MalĂ˝ Date: Thu, 18 Sep 2014 07:28:39 +0000 (+0200) Subject: Export append_stream() and free_stream() X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=aa1ecc7288ae86d3c1a317e491aeb5defc974ab9;p=KLGD.git Export append_stream() and free_stream() --- diff --git a/klgd.c b/klgd.c index 4726931..76fdc4a 100644 --- a/klgd.c +++ b/klgd.c @@ -27,7 +27,6 @@ struct klgd_main_private { int (*send_command_stream)(void *dev_ctx, const struct klgd_command_stream *stream); }; -static void klgd_free_stream(struct klgd_command_stream *s); static void klgd_schedule_update(struct klgd_main_private *priv); struct klgd_command * klgd_alloc_cmd(const size_t length) @@ -80,7 +79,7 @@ bool klgd_append_cmd(struct klgd_command_stream *target, const struct klgd_comma EXPORT_SYMBOL_GPL(klgd_append_cmd); -static bool klgd_append_stream(struct klgd_command_stream *target, const struct klgd_command_stream *source) +bool klgd_append_stream(struct klgd_command_stream *target, const struct klgd_command_stream *source) { const struct klgd_command **temp; size_t idx; @@ -103,6 +102,7 @@ static bool klgd_append_stream(struct klgd_command_stream *target, const struct return true; } +EXPORT_SYMBOL_GPL(klgd_append_stream); /** * Called with plugins_lock held @@ -195,7 +195,7 @@ static void klgd_free_command(const struct klgd_command *cmd) } } -static void klgd_free_stream(struct klgd_command_stream *s) +void klgd_free_stream(struct klgd_command_stream *s) { size_t idx; @@ -205,6 +205,7 @@ static void klgd_free_stream(struct klgd_command_stream *s) for (idx = 0; idx < s->count; idx++) klgd_free_command(s->commands[idx]); } +EXPORT_SYMBOL_GPL(klgd_free_stream); void klgd_deinit(struct klgd_main *ctx) { diff --git a/klgd.h b/klgd.h index 2db29a9..6fc384b 100644 --- a/klgd.h +++ b/klgd.h @@ -26,7 +26,9 @@ struct klgd_plugin { struct klgd_command * klgd_alloc_cmd(const size_t length); struct klgd_command_stream * klgd_alloc_stream(void); bool klgd_append_cmd(struct klgd_command_stream *target, const struct klgd_command *cmd); +bool klgd_append_stream(struct klgd_command_stream *target, const struct klgd_command_stream *source); void klgd_deinit(struct klgd_main *ctx); +void klgd_free_stream(struct klgd_command_stream *s); int klgd_init(struct klgd_main *ctx, void *dev_ctx, int (*callback)(void *, const struct klgd_command_stream *), const unsigned long plugin_count); void klgd_lock_plugins(struct mutex *lock); struct klgd_command * klgd_make_cmd(const char * const bytes);