]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
can: ti_hecc: remove priv->can.do_get_state() callback
authorMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 4 Oct 2013 11:18:01 +0000 (13:18 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 31 Oct 2013 19:55:16 +0000 (20:55 +0100)
This patch removes the priv->can.do_get_state() callback, as it just returns
priv->can.state. The callback's only user can_fill_info() has direct access to
priv->can.state.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/ti_hecc.c

index beb5ef834f0fb4de00a703cc4a5db1c79863ecc1..60d95b44d0f70018d5aee7769ae04ff60a4411d3 100644 (file)
@@ -286,15 +286,6 @@ static inline u32 hecc_get_bit(struct ti_hecc_priv *priv, int reg, u32 bit_mask)
        return (hecc_read(priv, reg) & bit_mask) ? 1 : 0;
 }
 
-static int ti_hecc_get_state(const struct net_device *ndev,
-       enum can_state *state)
-{
-       struct ti_hecc_priv *priv = netdev_priv(ndev);
-
-       *state = priv->can.state;
-       return 0;
-}
-
 static int ti_hecc_set_btc(struct ti_hecc_priv *priv)
 {
        struct can_bittiming *bit_timing = &priv->can.bittiming;
@@ -940,7 +931,6 @@ static int ti_hecc_probe(struct platform_device *pdev)
 
        priv->can.bittiming_const = &ti_hecc_bittiming_const;
        priv->can.do_set_mode = ti_hecc_do_set_mode;
-       priv->can.do_get_state = ti_hecc_get_state;
        priv->can.do_get_berr_counter = ti_hecc_get_berr_counter;
        priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES;