1 // SPDX-License-Identifier: GPL-2.0-only
3 * This file is part of wl12xx
5 * Copyright (C) 2010-2011 Texas Instruments, Inc.
8 #include <linux/module.h>
10 #include <linux/wl12xx.h>
12 static struct wl1251_platform_data
*wl1251_platform_data
;
14 int __init
wl1251_set_platform_data(const struct wl1251_platform_data
*data
)
16 if (wl1251_platform_data
)
21 wl1251_platform_data
= kmemdup(data
, sizeof(*data
), GFP_KERNEL
);
22 if (!wl1251_platform_data
)
28 struct wl1251_platform_data
*wl1251_get_platform_data(void)
30 if (!wl1251_platform_data
)
31 return ERR_PTR(-ENODEV
);
33 return wl1251_platform_data
;
35 EXPORT_SYMBOL(wl1251_get_platform_data
);