Skip to content

Commit

Permalink
ethernet: tundra: Drop forward declaration of static functions
Browse files Browse the repository at this point in the history
Usually it's not necessary to declare static functions if the symbols are
in the right order. Moving the definition of tsi_eth_driver down in the
compilation unit allows to drop two such declarations.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220919131515.885361-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Uwe Kleine-König authored and Jakub Kicinski committed Sep 22, 2022
1 parent 9f87eb4 commit 393d34c
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions drivers/net/ethernet/tundra/tsi108_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@
/* Check the phy status every half a second. */
#define CHECK_PHY_INTERVAL (HZ/2)

static int tsi108_init_one(struct platform_device *pdev);
static int tsi108_ether_remove(struct platform_device *pdev);

struct tsi108_prv_data {
void __iomem *regs; /* Base of normal regs */
void __iomem *phyregs; /* Base of register bank used for PHY access */
Expand Down Expand Up @@ -144,16 +141,6 @@ struct tsi108_prv_data {
struct platform_device *pdev;
};

/* Structure for a device driver */

static struct platform_driver tsi_eth_driver = {
.probe = tsi108_init_one,
.remove = tsi108_ether_remove,
.driver = {
.name = "tsi-ethernet",
},
};

static void tsi108_timed_checker(struct timer_list *t);

#ifdef DEBUG
Expand Down Expand Up @@ -1683,6 +1670,16 @@ static int tsi108_ether_remove(struct platform_device *pdev)

return 0;
}

/* Structure for a device driver */

static struct platform_driver tsi_eth_driver = {
.probe = tsi108_init_one,
.remove = tsi108_ether_remove,
.driver = {
.name = "tsi-ethernet",
},
};
module_platform_driver(tsi_eth_driver);

MODULE_AUTHOR("Tundra Semiconductor Corporation");
Expand Down

0 comments on commit 393d34c

Please sign in to comment.