예제 #1
0
//----------------------------------------------------------------------------
// AF_CAN netdevice: close device
//----------------------------------------------------------------------------
static int pcan_netdev_close(struct net_device *dev)
{
  struct can_priv *priv = netdev_priv(dev);
  struct pcandev  *pdev = priv->pdev;

  DPRINTK(KERN_DEBUG "%s: %s %s\n", DEVICE_NAME, __FUNCTION__, dev->name);

  pcan_release_path(pdev);

  netif_stop_queue(dev);

  return 0;
}
예제 #2
0
static int pcan_release(struct inode *inode, struct file *filep)
{
	struct fileobj *fobj = (struct fileobj *)filep->private_data;

	DPRINTK(KERN_DEBUG "%s: pcan_release()\n", DEVICE_NAME);

	/* free the associated irq and allocated memory */
	if (fobj) {
		if (fobj->dev)
			pcan_release_path(fobj->dev);

		kfree(fobj);
	}
	return 0;
}