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

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
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -279,7 +279,6 @@ static u32 mpc512x_can_get_clock(struct platform_device *ofdev,
static const struct of_device_id mpc5xxx_can_table[];
static int mpc5xxx_can_probe(struct platform_device *ofdev)
{
	const struct of_device_id *match;
	const struct mpc5xxx_can_data *data;
	struct device_node *np = ofdev->dev.of_node;
	struct net_device *dev;
@@ -289,10 +288,9 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
	int irq, mscan_clksrc = 0;
	int err = -ENOMEM;

	match = of_match_device(mpc5xxx_can_table, &ofdev->dev);
	if (!match)
	data = of_device_get_match_data(&ofdev->dev);
	if (!data)
		return -EINVAL;
	data = match->data;

	base = of_iomap(np, 0);
	if (!base) {
@@ -319,7 +317,6 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)

	clock_name = of_get_property(np, "fsl,mscan-clock-source", NULL);

	BUG_ON(!data);
	priv->type = data->type;
	priv->can.clock.freq = data->get_clock(ofdev, clock_name,
					       &mscan_clksrc);
+2 −2
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
config CAN_RCAR
	tristate "Renesas R-Car and RZ/G CAN controller"
	depends on ARCH_RENESAS || ARM
	depends on ARCH_RENESAS || ARM || COMPILE_TEST
	help
	  Say Y here if you want to use CAN controller found on Renesas R-Car
	  or RZ/G SoCs.
@@ -11,7 +11,7 @@ config CAN_RCAR

config CAN_RCAR_CANFD
	tristate "Renesas R-Car CAN FD controller"
	depends on ARCH_RENESAS || ARM
	depends on ARCH_RENESAS || ARM || COMPILE_TEST
	help
	  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
+1 −1
Original line number Diff line number Diff line
@@ -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)
{
	struct rcar_canfd_channel *priv = priv = gpriv->ch[ch];
	struct rcar_canfd_channel *priv = gpriv->ch[ch];
	struct net_device *ndev = priv->ndev;
	u32 sts;