Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

void flexcan_device_free ( struct platform_device *  pdev  ) 

The function frees can device.

Parameters:
pdev the pointer of platform device.
Returns:
none

Definition at line 601 of file dev.c.

{
      struct net_device *net;
      struct flexcan_device *flexcan;
      int i, num;
      net = (struct net_device *)dev_get_drvdata(&pdev->dev);

      unregister_netdev(net);
      flexcan = netdev_priv(net);
      del_timer(&flexcan->timer);

      num = ARRAY_SIZE(flexcan_dev_attr);

      for (i = 0; i < num; i++)
            device_remove_file(&pdev->dev, flexcan_dev_attr + i);

      flexcan_device_detach(netdev_priv(net));
      free_netdev(net);
}


Generated by  Doxygen 1.6.0   Back to index