summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wlcore/wl12xx_platform_data.c
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2011-12-02 13:52:19 (GMT)
committerLuciano Coelho <coelho@ti.com>2012-04-12 05:43:56 (GMT)
commit7b3115f265de1b669b757f3802b67c9a7f146223 (patch)
tree4fdf48511d6b72bdc6d2b3e6db8fce5ad6ae397d /drivers/net/wireless/ti/wlcore/wl12xx_platform_data.c
parent90921014608d91a03766d0025fa32662dc7c5062 (diff)
downloadlinux-fsl-qoriq-7b3115f265de1b669b757f3802b67c9a7f146223.tar.xz
wl12xx/wlcore: rename wl12xx to wlcore
Rename the wl12xx driver directory to wlcore as an initial step towards the split of the driver into wlcore and wl12xx. We just rename the directory first to keep git blame happy. Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/wl12xx_platform_data.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/wl12xx_platform_data.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wlcore/wl12xx_platform_data.c b/drivers/net/wireless/ti/wlcore/wl12xx_platform_data.c
new file mode 100644
index 0000000..998e958
--- /dev/null
+++ b/drivers/net/wireless/ti/wlcore/wl12xx_platform_data.c
@@ -0,0 +1,49 @@
+/*
+ * This file is part of wl12xx
+ *
+ * Copyright (C) 2010-2011 Texas Instruments, Inc.
+ *
+ * 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 published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/wl12xx.h>
+
+static struct wl12xx_platform_data *platform_data;
+
+int __init wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
+{
+ if (platform_data)
+ return -EBUSY;
+ if (!data)
+ return -EINVAL;
+
+ platform_data = kmemdup(data, sizeof(*data), GFP_KERNEL);
+ if (!platform_data)
+ return -ENOMEM;
+
+ return 0;
+}
+
+struct wl12xx_platform_data *wl12xx_get_platform_data(void)
+{
+ if (!platform_data)
+ return ERR_PTR(-ENODEV);
+
+ return platform_data;
+}
+EXPORT_SYMBOL(wl12xx_get_platform_data);