Skip to content

Commit

Permalink
net/phy: Use module_spi_driver in spi_ks8995.c
Browse files Browse the repository at this point in the history
module_spi_driver() removes some boilerplate and makes the code
simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sachin Kamat authored and David S. Miller committed May 28, 2013
1 parent da6e378 commit 1a9561a
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions drivers/net/phy/spi_ks8995.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,19 +354,7 @@ static struct spi_driver ks8995_driver = {
.remove = ks8995_remove,
};

static int __init ks8995_init(void)
{
pr_info(DRV_DESC " version " DRV_VERSION "\n");

return spi_register_driver(&ks8995_driver);
}
module_init(ks8995_init);

static void __exit ks8995_exit(void)
{
spi_unregister_driver(&ks8995_driver);
}
module_exit(ks8995_exit);
module_spi_driver(ks8995_driver);

MODULE_DESCRIPTION(DRV_DESC);
MODULE_VERSION(DRV_VERSION);
Expand Down

0 comments on commit 1a9561a

Please sign in to comment.