proc: use seq_puts()/seq_putc() where possible
[linux-2.6/next.git] / drivers / net / wireless / wl12xx / wl12xx_platform_data.c
blob973b11060a8f2674d2ff75b72209c51d4ec95ace
1 #include <linux/module.h>
2 #include <linux/err.h>
3 #include <linux/wl12xx.h>
5 static const struct wl12xx_platform_data *platform_data;
7 int __init wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
9 if (platform_data)
10 return -EBUSY;
11 if (!data)
12 return -EINVAL;
14 platform_data = kmemdup(data, sizeof(*data), GFP_KERNEL);
15 if (!platform_data)
16 return -ENOMEM;
18 return 0;
21 const struct wl12xx_platform_data *wl12xx_get_platform_data(void)
23 if (!platform_data)
24 return ERR_PTR(-ENODEV);
26 return platform_data;
28 EXPORT_SYMBOL(wl12xx_get_platform_data);