03 Jun, 2013

1 commit

  • Use the wrapper functions for getting and setting the driver data using
    platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
    so we can directly pass a struct platform_device.

    Also, unnecessary dev_set_drvdata() is removed, because the driver core
    clears the driver data to NULL after device_release or on probe failure.

    Signed-off-by: Jingoo Han
    Signed-off-by: Marc Kleine-Budde

    Jingoo Han
     

27 Mar, 2013

1 commit


04 Dec, 2012

1 commit

  • CONFIG_HOTPLUG is going away as an option. As result the __dev*
    markings will be going away.

    Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
    and __devexit.

    Signed-off-by: Bill Pemberton
    Cc: Wolfgang Grandegger
    Cc: Marc Kleine-Budde
    Cc: linux-can@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

27 Nov, 2012

1 commit


20 Jul, 2012

1 commit


07 Jun, 2012

1 commit

  • Adding casts of objects to the same type is unnecessary
    and confusing for a human reader.

    For example, this cast:

    int y;
    int *p = (int *)&y;

    I used the coccinelle script below to find and remove these
    unnecessary casts. I manually removed the conversions this
    script produces of casts with __force, __iomem and __user.

    @@
    type T;
    T *p;
    @@

    - (T *)p
    + p

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

03 Feb, 2012

2 commits


29 Nov, 2011

1 commit

  • This patch converts the drivers in drivers/net/can/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Cc: Wolfgang Grandegger
    Cc: "David S. Miller"
    Cc: Bhupesh Sharma
    Cc: Jiri Kosina
    Cc: Grant Likely
    Cc: Anatolij Gustschin
    Cc: Paul Bolle
    Cc: Kurt Van Dijck
    Cc: Alexey Dobriyan
    Signed-off-by: Axel Lin
    Acked-by: Marc Kleine-Budde
    Signed-off-by: David S. Miller

    Axel Lin
     

28 Jun, 2011

2 commits

  • Since we have a struct that defines the sizes of the registers, we don't
    need to explicitly use the 16bit read/write helpers. Let the code figure
    out which size access to make based on the size of the C type.

    There should be no functional changes here.

    Signed-off-by: Mike Frysinger
    Acked-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Mike Frysinger
     
  • If we look closely, the 4 writes to TRANSMIT_CHL.id1 can be collapsed
    down into much simpler code. So do just that.

    This also fixes a build failure due to the I/O macros no longer
    getting pulled in. Their minor (and accidental) usage here gets
    dropped as part of the unification.

    Signed-off-by: Mike Frysinger
    Acked-by: Wolfgang Grandegger
    Acked-by: Kurt Van Dijck
    Signed-off-by: David S. Miller

    Mike Frysinger
     

10 May, 2010

1 commit

  • Now that core network takes care of trans_start updates, dont do it
    in drivers themselves, if possible. Drivers can avoid one cache miss
    (on dev->trans_start) in their start_xmit() handler.

    Exceptions are NETIF_F_LLTX drivers

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

13 Apr, 2010

1 commit


23 Mar, 2010

1 commit


09 Mar, 2010

1 commit


15 Jan, 2010

1 commit


12 Jan, 2010

1 commit

  • To prevent the CAN drivers to operate on invalid socketbuffers the skbs are
    now checked and silently dropped at the xmit-function consistently.

    Also the netdev stats are consistently using the CAN data length code (dlc)
    for [rx|tx]_bytes now.

    Signed-off-by: Oliver Hartkopp
    Acked-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

14 Dec, 2009

1 commit

  • A valid CAN dataframe can have a data length code (DLC) of 0 .. 8 data bytes.

    When reading the CAN controllers register the 4-bit value may contain values
    from 0 .. 15 which may exceed the reserved space in the socket buffer!

    The ISO 11898-1 Chapter 8.4.2.3 (DLC field) says that register values > 8
    should be reduced to 8 without any error reporting or frame drop.

    This patch introduces a new helper macro to cast a given 4-bit data length
    code (dlc) to __u8 and ensure the DLC value to be max. 8 bytes.

    The different handlings in the rx path of the CAN netdevice drivers are fixed.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

12 Dec, 2009

1 commit