Skip to content

Commit

Permalink
Merge tag 'linux-can-next-for-5.15-20210825' of git://git.kernel.org/…
Browse files Browse the repository at this point in the history
…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: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 25, 2021

Unverified

No user is associated with the committer email.
2 parents b87a542 + cbe8cd7 commit 45bc612
Showing 3 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions drivers/net/can/mscan/mpc5xxx_can.c
Original file line number Diff line number Diff line change
@@ -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);
4 changes: 2 additions & 2 deletions drivers/net/can/rcar/Kconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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
2 changes: 1 addition & 1 deletion drivers/net/can/rcar/rcar_canfd.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 45bc612

Please sign in to comment.