In order to add chip-specific operations and prepare for future elements that need to be set by the lower driver, move the wl1271 structure to the wlcore.h file and add an empty placeholder for the operations structure. Signed-off-by: Luciano Coelho <coelho@ti.com>
80 lines
1.9 KiB
C
80 lines
1.9 KiB
C
/*
|
|
* This file is part of wl1271
|
|
*
|
|
* Copyright (C) 2008-2010 Nokia Corporation
|
|
*
|
|
* 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/platform_device.h>
|
|
|
|
#include <linux/err.h>
|
|
|
|
#include "../wlcore/wlcore.h"
|
|
#include "../wlcore/debug.h"
|
|
|
|
static struct wlcore_ops wl12xx_ops = {
|
|
};
|
|
|
|
static int __devinit wl12xx_probe(struct platform_device *pdev)
|
|
{
|
|
struct wl1271 *wl;
|
|
struct ieee80211_hw *hw;
|
|
|
|
hw = wlcore_alloc_hw();
|
|
if (IS_ERR(hw)) {
|
|
wl1271_error("can't allocate hw");
|
|
return PTR_ERR(hw);
|
|
}
|
|
|
|
wl = hw->priv;
|
|
wl->ops = &wl12xx_ops;
|
|
|
|
return wlcore_probe(wl, pdev);
|
|
}
|
|
|
|
static const struct platform_device_id wl12xx_id_table[] __devinitconst = {
|
|
{ "wl12xx", 0 },
|
|
{ } /* Terminating Entry */
|
|
};
|
|
MODULE_DEVICE_TABLE(platform, wl12xx_id_table);
|
|
|
|
static struct platform_driver wl12xx_driver = {
|
|
.probe = wl12xx_probe,
|
|
.remove = __devexit_p(wlcore_remove),
|
|
.id_table = wl12xx_id_table,
|
|
.driver = {
|
|
.name = "wl12xx_driver",
|
|
.owner = THIS_MODULE,
|
|
}
|
|
};
|
|
|
|
static int __init wl12xx_init(void)
|
|
{
|
|
return platform_driver_register(&wl12xx_driver);
|
|
}
|
|
module_init(wl12xx_init);
|
|
|
|
static void __exit wl12xx_exit(void)
|
|
{
|
|
platform_driver_unregister(&wl12xx_driver);
|
|
}
|
|
module_exit(wl12xx_exit);
|
|
|
|
MODULE_LICENSE("GPL v2");
|
|
MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
|