Skip to content

Commit

Permalink
orinoco: checkpatch cleanup
Browse files Browse the repository at this point in the history
Fix errors and obvious warnings reported by checkpatch in all files
except orinoco.c. Orinoco.c is part of different patch series of Dave.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Andrey Borzenkov authored and John W. Linville committed Feb 9, 2009
1 parent aa6320d commit d14c7c1
Show file tree
Hide file tree
Showing 11 changed files with 143 additions and 119 deletions.
35 changes: 20 additions & 15 deletions drivers/net/wireless/orinoco/airport.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* card.
*
* Copyright notice & release notes in file orinoco.c
*
*
* Note specific to airport stub:
*
*
* 0.05 : first version of the new split driver
* 0.06 : fix possible hang on powerup, add sleep support
*/
Expand Down Expand Up @@ -60,7 +60,8 @@ airport_suspend(struct macio_dev *mdev, pm_message_t state)
orinoco_unlock(priv, &flags);

disable_irq(dev->irq);
pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(mdev), 0, 0);
pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
macio_get_of_node(mdev), 0, 0);

return 0;
}
Expand All @@ -75,7 +76,8 @@ airport_resume(struct macio_dev *mdev)

printk(KERN_DEBUG "%s: Airport waking up\n", dev->name);

pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(mdev), 0, 1);
pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
macio_get_of_node(mdev), 0, 1);
msleep(200);

enable_irq(dev->irq);
Expand All @@ -93,7 +95,7 @@ airport_resume(struct macio_dev *mdev)

priv->hw_unavailable--;

if (priv->open && (! priv->hw_unavailable)) {
if (priv->open && (!priv->hw_unavailable)) {
err = __orinoco_up(dev);
if (err)
printk(KERN_ERR "%s: Error %d restarting card on PBOOK_WAKE\n",
Expand Down Expand Up @@ -127,7 +129,8 @@ airport_detach(struct macio_dev *mdev)

macio_release_resource(mdev, 0);

pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(mdev), 0, 0);
pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
macio_get_of_node(mdev), 0, 0);
ssleep(1);

macio_set_drvdata(mdev, NULL);
Expand All @@ -153,9 +156,11 @@ static int airport_hard_reset(struct orinoco_private *priv)
* off. */
disable_irq(dev->irq);

pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(card->mdev), 0, 0);
pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
macio_get_of_node(card->mdev), 0, 0);
ssleep(1);
pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(card->mdev), 0, 1);
pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
macio_get_of_node(card->mdev), 0, 1);
ssleep(1);

enable_irq(dev->irq);
Expand All @@ -182,7 +187,7 @@ airport_attach(struct macio_dev *mdev, const struct of_device_id *match)
/* Allocate space for private device-specific data */
dev = alloc_orinocodev(sizeof(*card), &mdev->ofdev.dev,
airport_hard_reset, NULL);
if (! dev) {
if (!dev) {
printk(KERN_ERR PFX "Cannot allocate network device\n");
return -ENODEV;
}
Expand Down Expand Up @@ -214,9 +219,10 @@ airport_attach(struct macio_dev *mdev, const struct of_device_id *match)
}

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);
pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
macio_get_of_node(mdev), 0, 1);
ssleep(1);

/* Reset it before we get the interrupt */
Expand Down Expand Up @@ -248,18 +254,17 @@ MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
MODULE_DESCRIPTION("Driver for the Apple Airport wireless card.");
MODULE_LICENSE("Dual MPL/GPL");

static struct of_device_id airport_match[] =
static struct of_device_id airport_match[] =
{
{
.name = "radio",
},
{},
};

MODULE_DEVICE_TABLE (of, airport_match);
MODULE_DEVICE_TABLE(of, airport_match);

static struct macio_driver airport_driver =
{
static struct macio_driver airport_driver = {
.name = DRIVER_NAME,
.match_table = airport_match,
.probe = airport_attach,
Expand Down
Loading

0 comments on commit d14c7c1

Please sign in to comment.