Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb168e2e authored by Gavin Shan's avatar Gavin Shan Committed by David S. Miller
Browse files

net/faraday: Match driver according to compatible property



This matches the driver with devices compatible with "faraday,ftgmac100"
declared in the device tree. Originally, device's name from device
tree for it.

Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
Acked-by: default avatarJoel Stanley <joel@jms.id.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bd466c3f
Loading
Loading
Loading
Loading
+11 −5
Original line number Original line Diff line number Diff line
@@ -1438,14 +1438,20 @@ static int __exit ftgmac100_remove(struct platform_device *pdev)
	return 0;
	return 0;
}
}


static const struct of_device_id ftgmac100_of_match[] = {
	{ .compatible = "faraday,ftgmac100" },
	{ }
};
MODULE_DEVICE_TABLE(of, ftgmac100_of_match);

static struct platform_driver ftgmac100_driver = {
static struct platform_driver ftgmac100_driver = {
	.probe	= ftgmac100_probe,
	.probe	= ftgmac100_probe,
	.remove	= __exit_p(ftgmac100_remove),
	.remove	= __exit_p(ftgmac100_remove),
	.driver	= {
	.driver	= {
		.name		= DRV_NAME,
		.name		= DRV_NAME,
		.of_match_table	= ftgmac100_of_match,
	},
	},
};
};

module_platform_driver(ftgmac100_driver);
module_platform_driver(ftgmac100_driver);


MODULE_AUTHOR("Po-Yu Chuang <ratbert@faraday-tech.com>");
MODULE_AUTHOR("Po-Yu Chuang <ratbert@faraday-tech.com>");