Skip to content

Commit

Permalink
PNP: moved EXPORT_SYMBOL so that it immediately followed its function…
Browse files Browse the repository at this point in the history
…/variable

change made to resolve following checkpatch message:
  WARNING: EXPORT_SYMBOL(foo); should immediately follow its
function/variable

Signed-off-by: Jinchao Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Jinchao Wang authored and gregkh committed Jun 24, 2021
1 parent a25d144 commit d02908a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
7 changes: 3 additions & 4 deletions drivers/pnp/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink,
dev->card_link = NULL;
return NULL;
}
EXPORT_SYMBOL(pnp_request_card_device);

/**
* pnp_release_card_device - call this when the driver no longer needs the device
Expand All @@ -382,6 +383,7 @@ void pnp_release_card_device(struct pnp_dev *dev)
device_release_driver(&dev->dev);
drv->link.remove = &card_remove_first;
}
EXPORT_SYMBOL(pnp_release_card_device);

/*
* suspend/resume callbacks
Expand Down Expand Up @@ -439,6 +441,7 @@ int pnp_register_card_driver(struct pnp_card_driver *drv)
}
return 0;
}
EXPORT_SYMBOL(pnp_register_card_driver);

/**
* pnp_unregister_card_driver - unregisters a PnP card driver from the PnP Layer
Expand All @@ -451,8 +454,4 @@ void pnp_unregister_card_driver(struct pnp_card_driver *drv)
mutex_unlock(&pnp_lock);
pnp_unregister_driver(&drv->link);
}

EXPORT_SYMBOL(pnp_request_card_device);
EXPORT_SYMBOL(pnp_release_card_device);
EXPORT_SYMBOL(pnp_register_card_driver);
EXPORT_SYMBOL(pnp_unregister_card_driver);
9 changes: 4 additions & 5 deletions drivers/pnp/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ int pnp_device_attach(struct pnp_dev *pnp_dev)
mutex_unlock(&pnp_lock);
return 0;
}
EXPORT_SYMBOL(pnp_device_attach);

void pnp_device_detach(struct pnp_dev *pnp_dev)
{
Expand All @@ -76,6 +77,7 @@ void pnp_device_detach(struct pnp_dev *pnp_dev)
pnp_dev->status = PNP_READY;
mutex_unlock(&pnp_lock);
}
EXPORT_SYMBOL(pnp_device_detach);

static int pnp_device_probe(struct device *dev)
{
Expand Down Expand Up @@ -271,11 +273,13 @@ int pnp_register_driver(struct pnp_driver *drv)

return driver_register(&drv->driver);
}
EXPORT_SYMBOL(pnp_register_driver);

void pnp_unregister_driver(struct pnp_driver *drv)
{
driver_unregister(&drv->driver);
}
EXPORT_SYMBOL(pnp_unregister_driver);

/**
* pnp_add_id - adds an EISA id to the specified device
Expand Down Expand Up @@ -310,8 +314,3 @@ struct pnp_id *pnp_add_id(struct pnp_dev *dev, const char *id)

return dev_id;
}

EXPORT_SYMBOL(pnp_register_driver);
EXPORT_SYMBOL(pnp_unregister_driver);
EXPORT_SYMBOL(pnp_device_attach);
EXPORT_SYMBOL(pnp_device_detach);
1 change: 0 additions & 1 deletion drivers/pnp/isapnp/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,4 @@ struct pnp_dev *pnp_find_dev(struct pnp_card *card, unsigned short vendor,
}
return NULL;
}

EXPORT_SYMBOL(pnp_find_dev);
7 changes: 3 additions & 4 deletions drivers/pnp/manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ int pnp_start_dev(struct pnp_dev *dev)
dev_info(&dev->dev, "activated\n");
return 0;
}
EXPORT_SYMBOL(pnp_start_dev);

/**
* pnp_stop_dev - low-level disable of the PnP device
Expand All @@ -371,6 +372,7 @@ int pnp_stop_dev(struct pnp_dev *dev)
dev_info(&dev->dev, "disabled\n");
return 0;
}
EXPORT_SYMBOL(pnp_stop_dev);

/**
* pnp_activate_dev - activates a PnP device for use
Expand All @@ -396,6 +398,7 @@ int pnp_activate_dev(struct pnp_dev *dev)
dev->active = 1;
return 0;
}
EXPORT_SYMBOL(pnp_activate_dev);

/**
* pnp_disable_dev - disables device
Expand Down Expand Up @@ -423,8 +426,4 @@ int pnp_disable_dev(struct pnp_dev *dev)

return 0;
}

EXPORT_SYMBOL(pnp_start_dev);
EXPORT_SYMBOL(pnp_stop_dev);
EXPORT_SYMBOL(pnp_activate_dev);
EXPORT_SYMBOL(pnp_disable_dev);
1 change: 0 additions & 1 deletion drivers/pnp/support.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ int pnp_is_active(struct pnp_dev *dev)
else
return 1;
}

EXPORT_SYMBOL(pnp_is_active);

/*
Expand Down

0 comments on commit d02908a

Please sign in to comment.