git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
net
/
wireless
/
airport.c
diff --git
a/drivers/net/wireless/airport.c
b/drivers/net/wireless/airport.c
index
51c5413
..
38fac3b
100644
(file)
--- a/
drivers/net/wireless/airport.c
+++ b/
drivers/net/wireless/airport.c
@@
-14,30
+14,11
@@
#define DRIVER_NAME "airport"
#define PFX DRIVER_NAME ": "
#define DRIVER_NAME "airport"
#define PFX DRIVER_NAME ": "
-#include <linux/config.h>
-
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/ptrace.h>
-#include <linux/slab.h>
-#include <linux/string.h>
-#include <linux/timer.h>
-#include <linux/ioport.h>
-#include <linux/netdevice.h>
-#include <linux/if_arp.h>
-#include <linux/etherdevice.h>
-#include <linux/wireless.h>
#include <linux/delay.h>
#include <linux/delay.h>
-
-#include <asm/io.h>
-#include <asm/system.h>
-#include <asm/current.h>
-#include <asm/prom.h>
-#include <asm/machdep.h>
#include <asm/pmac_feature.h>
#include <asm/pmac_feature.h>
-#include <asm/irq.h>
-#include <asm/uaccess.h>
#include "orinoco.h"
#include "orinoco.h"
@@
-45,13
+26,13
@@
struct airport {
struct macio_dev *mdev;
struct airport {
struct macio_dev *mdev;
- void *vaddr;
+ void
__iomem
*vaddr;
int irq_requested;
int ndev_registered;
};
static int
int irq_requested;
int ndev_registered;
};
static int
-airport_suspend(struct macio_dev *mdev,
u32
state)
+airport_suspend(struct macio_dev *mdev,
pm_message_t
state)
{
struct net_device *dev = dev_get_drvdata(&mdev->ofdev.dev);
struct orinoco_private *priv = netdev_priv(dev);
{
struct net_device *dev = dev_get_drvdata(&mdev->ofdev.dev);
struct orinoco_private *priv = netdev_priv(dev);
@@
-150,7
+131,7
@@
airport_detach(struct macio_dev *mdev)
ssleep(1);
macio_set_drvdata(mdev, NULL);
ssleep(1);
macio_set_drvdata(mdev, NULL);
- free_
net
dev(dev);
+ free_
orinoco
dev(dev);
return 0;
}
return 0;
}
@@
-185,7
+166,7
@@
static int airport_hard_reset(struct orinoco_private *priv)
}
static int
}
static int
-airport_attach(struct macio_dev *mdev, const struct of_
match
*match)
+airport_attach(struct macio_dev *mdev, const struct of_
device_id
*match)
{
struct orinoco_private *priv;
struct net_device *dev;
{
struct orinoco_private *priv;
struct net_device *dev;
@@
-194,14
+175,14
@@
airport_attach(struct macio_dev *mdev, const struct of_match *match)
hermes_t *hw;
if (macio_resource_count(mdev) < 1 || macio_irq_count(mdev) < 1) {
hermes_t *hw;
if (macio_resource_count(mdev) < 1 || macio_irq_count(mdev) < 1) {
- printk(KERN_ERR PFX "
w
rong interrupt/addresses in OF tree\n");
+ printk(KERN_ERR PFX "
W
rong interrupt/addresses in OF tree\n");
return -ENODEV;
}
/* Allocate space for private device-specific data */
dev = alloc_orinocodev(sizeof(*card), airport_hard_reset);
if (! dev) {
return -ENODEV;
}
/* Allocate space for private device-specific data */
dev = alloc_orinocodev(sizeof(*card), airport_hard_reset);
if (! dev) {
- printk(KERN_ERR PFX "
can't allocate device datas
\n");
+ printk(KERN_ERR PFX "
Cannot allocate network device
\n");
return -ENODEV;
}
priv = netdev_priv(dev);
return -ENODEV;
}
priv = netdev_priv(dev);
@@
-212,7
+193,7
@@
airport_attach(struct macio_dev *mdev, const struct of_match *match)
if (macio_request_resource(mdev, 0, "airport")) {
printk(KERN_ERR PFX "can't request IO resource !\n");
if (macio_request_resource(mdev, 0, "airport")) {
printk(KERN_ERR PFX "can't request IO resource !\n");
- free_
net
dev(dev);
+ free_
orinoco
dev(dev);
return -EBUSY;
}
return -EBUSY;
}
@@
-224,16
+205,15
@@
airport_attach(struct macio_dev *mdev, const struct of_match *match)
/* Setup interrupts & base address */
dev->irq = macio_irq(mdev, 0);
phys_addr = macio_resource_start(mdev, 0); /* Physical address */
/* Setup interrupts & base address */
dev->irq = macio_irq(mdev, 0);
phys_addr = macio_resource_start(mdev, 0); /* Physical address */
- printk(KERN_DEBUG PFX "
Airport at p
hysical address %lx\n", phys_addr);
+ printk(KERN_DEBUG PFX "
P
hysical address %lx\n", phys_addr);
dev->base_addr = phys_addr;
card->vaddr = ioremap(phys_addr, AIRPORT_IO_LEN);
if (!card->vaddr) {
dev->base_addr = phys_addr;
card->vaddr = ioremap(phys_addr, AIRPORT_IO_LEN);
if (!card->vaddr) {
- printk(PFX "ioremap() failed\n");
+ printk(
KERN_ERR
PFX "ioremap() failed\n");
goto failed;
}
goto failed;
}
- hermes_struct_init(hw, (ulong)card->vaddr,
- HERMES_MEM, HERMES_16BIT_REGSPACING);
+ hermes_struct_init(hw, card->vaddr, HERMES_16BIT_REGSPACING);
/* Power up card */
pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(mdev), 0, 1);
/* Power up card */
pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(mdev), 0, 1);
@@
-242,7
+222,7
@@
airport_attach(struct macio_dev *mdev, const struct of_match *match)
/* Reset it before we get the interrupt */
hermes_init(hw);
/* Reset it before we get the interrupt */
hermes_init(hw);
- if (request_irq(dev->irq, orinoco_interrupt, 0,
"Airport"
, dev)) {
+ if (request_irq(dev->irq, orinoco_interrupt, 0,
dev->name
, dev)) {
printk(KERN_ERR PFX "Couldn't get IRQ %d\n", dev->irq);
goto failed;
}
printk(KERN_ERR PFX "Couldn't get IRQ %d\n", dev->irq);
goto failed;
}
@@
-253,7
+233,7
@@
airport_attach(struct macio_dev *mdev, const struct of_match *match)
printk(KERN_ERR PFX "register_netdev() failed\n");
goto failed;
}
printk(KERN_ERR PFX "register_netdev() failed\n");
goto failed;
}
- printk(KERN_DEBUG PFX "
c
ard registered for interface %s\n", dev->name);
+ printk(KERN_DEBUG PFX "
C
ard registered for interface %s\n", dev->name);
card->ndev_registered = 1;
return 0;
failed:
card->ndev_registered = 1;
return 0;
failed:
@@
-268,16
+248,16
@@
MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
MODULE_DESCRIPTION("Driver for the Apple Airport wireless card.");
MODULE_LICENSE("Dual MPL/GPL");
MODULE_DESCRIPTION("Driver for the Apple Airport wireless card.");
MODULE_LICENSE("Dual MPL/GPL");
-static struct of_
match
airport_match[] =
+static struct of_
device_id
airport_match[] =
{
{
.name = "radio",
{
{
.name = "radio",
- .type = OF_ANY_MATCH,
- .compatible = OF_ANY_MATCH
},
{},
};
},
{},
};
+MODULE_DEVICE_TABLE (of, airport_match);
+
static struct macio_driver airport_driver =
{
.name = DRIVER_NAME,
static struct macio_driver airport_driver =
{
.name = DRIVER_NAME,