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

static int mxci2c_remove ( struct platform_device *  pdev  )  [static]

Dissociates the driver from the I2C device.

Parameters:
pdev the device structure used to give information on which I2C to remove
Returns:
The function always returns 0.

Definition at line 750 of file mxc_i2c.c.

References mxc_i2c_device::adap, mxc_i2c_device::clk, gpio_i2c_inactive(), and mxc_i2c_device::irq.

{
      mxc_i2c_device *mxc_i2c = platform_get_drvdata(pdev);
      int id = pdev->id;

      free_irq(mxc_i2c->irq, mxc_i2c);
      i2c_del_adapter(&mxc_i2c->adap);
      gpio_i2c_inactive(id);
      clk_put(mxc_i2c->clk);
      platform_set_drvdata(pdev, NULL);
      return 0;
}


Generated by  Doxygen 1.6.0   Back to index