summaryrefslogtreecommitdiff
path: root/drivers/staging/most/aim-v4l2
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2015-09-28 17:18:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 03:18:49 +0200
commitec5c00afc2cab1c0e6692541302bc620437c8441 (patch)
tree173e8a1687c1f331b802fedb85aff9ea8f86909a /drivers/staging/most/aim-v4l2
parent5cfe8c144524f7e1688b41c5dab46722be4a912b (diff)
staging: most: change structure initialization
By applying this patch the initialization of the most_aim structure is performed at compile time. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/aim-v4l2')
-rw-r--r--drivers/staging/most/aim-v4l2/video.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c
index 83332454974c..377bb107c94c 100644
--- a/drivers/staging/most/aim-v4l2/video.c
+++ b/drivers/staging/most/aim-v4l2/video.c
@@ -62,7 +62,6 @@ struct aim_fh {
static struct list_head video_devices = LIST_HEAD_INIT(video_devices);
static struct spinlock list_lock;
-static struct most_aim aim_info;
static inline bool data_ready(struct most_video_dev *mdev)
@@ -590,14 +589,16 @@ static int aim_disconnect_channel(struct most_interface *iface,
return 0;
}
+static struct most_aim aim_info = {
+ .name = "v4l",
+ .probe_channel = aim_probe_channel,
+ .disconnect_channel = aim_disconnect_channel,
+ .rx_completion = aim_rx_data,
+};
+
static int __init aim_init(void)
{
spin_lock_init(&list_lock);
-
- aim_info.name = "v4l";
- aim_info.probe_channel = aim_probe_channel;
- aim_info.disconnect_channel = aim_disconnect_channel;
- aim_info.rx_completion = aim_rx_data;
return most_register_aim(&aim_info);
}