Commit daca6afc authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'net-vertexcom-mse102x-minor-clean-ups'

Stefan Wahren says:

====================
net: vertexcom: mse102x: Minor clean-ups

This series provides some minor clean-ups for the Vertexcom MSE102x
driver.
====================

Link: https://patch.msgid.link/20240827191000.3244-1-wahrenst@gmx.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 0a8b08c5 bc682b80
......@@ -377,8 +377,8 @@ static int mse102x_tx_pkt_spi(struct mse102x_net *mse, struct sk_buff *txb,
int ret;
bool first = true;
if (txb->len < 60)
pad = 60 - txb->len;
if (txb->len < ETH_ZLEN)
pad = ETH_ZLEN - txb->len;
while (1) {
mse102x_tx_cmd_spi(mse, CMD_RTS | (txb->len + pad));
......@@ -451,7 +451,7 @@ static void mse102x_tx_work(struct work_struct *work)
if (ret == -ETIMEDOUT) {
if (netif_msg_timer(mse))
netdev_err(mse->ndev, "tx work timeout\n");
netdev_err_once(mse->ndev, "tx work timeout\n");
mse->stats.tx_timeout++;
}
......@@ -485,8 +485,8 @@ static void mse102x_init_mac(struct mse102x_net *mse, struct device_node *np)
if (ret) {
eth_hw_addr_random(ndev);
netdev_err(ndev, "Using random MAC address: %pM\n",
ndev->dev_addr);
dev_warn(ndev->dev.parent, "Using random MAC address: %pM\n",
ndev->dev_addr);
}
}
......@@ -622,8 +622,6 @@ static const struct ethtool_ops mse102x_ethtool_ops = {
/* driver bus management functions */
#ifdef CONFIG_PM_SLEEP
static int mse102x_suspend(struct device *dev)
{
struct mse102x_net *mse = dev_get_drvdata(dev);
......@@ -649,9 +647,8 @@ static int mse102x_resume(struct device *dev)
return 0;
}
#endif
static SIMPLE_DEV_PM_OPS(mse102x_pm_ops, mse102x_suspend, mse102x_resume);
static DEFINE_SIMPLE_DEV_PM_OPS(mse102x_pm_ops, mse102x_suspend, mse102x_resume);
static int mse102x_probe_spi(struct spi_device *spi)
{
......@@ -736,9 +733,6 @@ static void mse102x_remove_spi(struct spi_device *spi)
struct mse102x_net *mse = dev_get_drvdata(&spi->dev);
struct mse102x_net_spi *mses = to_mse102x_spi(mse);
if (netif_msg_drv(mse))
dev_info(&spi->dev, "remove\n");
mse102x_remove_device_debugfs(mses);
unregister_netdev(mse->ndev);
}
......@@ -761,7 +755,7 @@ static struct spi_driver mse102x_driver = {
.driver = {
.name = DRV_NAME,
.of_match_table = mse102x_match_table,
.pm = &mse102x_pm_ops,
.pm = pm_sleep_ptr(&mse102x_pm_ops),
},
.probe = mse102x_probe_spi,
.remove = mse102x_remove_spi,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment