Commit 45bc6125 authored by David S. Miller's avatar David S. Miller

Merge tag 'linux-can-next-for-5.15-20210825' of...

Merge tag 'linux-can-next-for-5.15-20210825' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next

Marc Kleine says:

====================
pull-request: can-next 2021-08-25

this is a pull request of 4 patches for net-next/master.

The first patch is by Cai Huoqing, and enables COMPILE_TEST for the
rcar CAN drivers.

Lad Prabhakar contributes a patch for the rcar_canfd driver, fixing a
redundant assignment.

The last 2 patches are by Tang Bin, target the mscan driver, and clean
up the driver by converting it to of_device_get_match_data() and
removing a useless BUG_ON.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents b87a542c cbe8cd7d
...@@ -279,7 +279,6 @@ static u32 mpc512x_can_get_clock(struct platform_device *ofdev, ...@@ -279,7 +279,6 @@ static u32 mpc512x_can_get_clock(struct platform_device *ofdev,
static const struct of_device_id mpc5xxx_can_table[]; static const struct of_device_id mpc5xxx_can_table[];
static int mpc5xxx_can_probe(struct platform_device *ofdev) static int mpc5xxx_can_probe(struct platform_device *ofdev)
{ {
const struct of_device_id *match;
const struct mpc5xxx_can_data *data; const struct mpc5xxx_can_data *data;
struct device_node *np = ofdev->dev.of_node; struct device_node *np = ofdev->dev.of_node;
struct net_device *dev; struct net_device *dev;
...@@ -289,10 +288,9 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev) ...@@ -289,10 +288,9 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
int irq, mscan_clksrc = 0; int irq, mscan_clksrc = 0;
int err = -ENOMEM; int err = -ENOMEM;
match = of_match_device(mpc5xxx_can_table, &ofdev->dev); data = of_device_get_match_data(&ofdev->dev);
if (!match) if (!data)
return -EINVAL; return -EINVAL;
data = match->data;
base = of_iomap(np, 0); base = of_iomap(np, 0);
if (!base) { if (!base) {
...@@ -319,7 +317,6 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev) ...@@ -319,7 +317,6 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
clock_name = of_get_property(np, "fsl,mscan-clock-source", NULL); clock_name = of_get_property(np, "fsl,mscan-clock-source", NULL);
BUG_ON(!data);
priv->type = data->type; priv->type = data->type;
priv->can.clock.freq = data->get_clock(ofdev, clock_name, priv->can.clock.freq = data->get_clock(ofdev, clock_name,
&mscan_clksrc); &mscan_clksrc);
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
config CAN_RCAR config CAN_RCAR
tristate "Renesas R-Car and RZ/G CAN controller" tristate "Renesas R-Car and RZ/G CAN controller"
depends on ARCH_RENESAS || ARM depends on ARCH_RENESAS || ARM || COMPILE_TEST
help help
Say Y here if you want to use CAN controller found on Renesas R-Car Say Y here if you want to use CAN controller found on Renesas R-Car
or RZ/G SoCs. or RZ/G SoCs.
...@@ -11,7 +11,7 @@ config CAN_RCAR ...@@ -11,7 +11,7 @@ config CAN_RCAR
config CAN_RCAR_CANFD config CAN_RCAR_CANFD
tristate "Renesas R-Car CAN FD controller" tristate "Renesas R-Car CAN FD controller"
depends on ARCH_RENESAS || ARM depends on ARCH_RENESAS || ARM || COMPILE_TEST
help help
Say Y here if you want to use CAN FD controller found on Say Y here if you want to use CAN FD controller found on
Renesas R-Car SoCs. The driver puts the controller in CAN FD only Renesas R-Car SoCs. The driver puts the controller in CAN FD only
......
...@@ -1182,7 +1182,7 @@ static void rcar_canfd_state_change(struct net_device *ndev, ...@@ -1182,7 +1182,7 @@ static void rcar_canfd_state_change(struct net_device *ndev,
static void rcar_canfd_handle_channel_tx(struct rcar_canfd_global *gpriv, u32 ch) static void rcar_canfd_handle_channel_tx(struct rcar_canfd_global *gpriv, u32 ch)
{ {
struct rcar_canfd_channel *priv = priv = gpriv->ch[ch]; struct rcar_canfd_channel *priv = gpriv->ch[ch];
struct net_device *ndev = priv->ndev; struct net_device *ndev = priv->ndev;
u32 sts; u32 sts;
......
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