Re: [PATCH] i2c: viai2c: turn common code into a proper module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

...

> +EXPORT_SYMBOL_GPL(viai2c_init);
> +
> +MODULE_DESCRIPTION("Via/Wondermedia/Zhaoxin I2C master-mode bus adapter");
> +MODULE_AUTHOR("Tony Prisk <linux@xxxxxxxxxxxxxxx>");

Do we want to add also Hans here?

> +MODULE_LICENSE("GPL");

...

> +static irqreturn_t wmt_i2c_isr(int irq, void *data)
> +{

...

> +	/* All the data has been successfully transferred or error occurred */
> +	if (i2c->ret)
> +		complete(&i2c->complete);
> +
> +	return IRQ_HANDLED;
> +}
> +
> +

I took the freedom to remove this double blank line.

>  static int wmt_i2c_probe(struct platform_device *pdev)
>  {
>  	struct device_node *np = pdev->dev.of_node;

...

> @@ -239,6 +298,16 @@ static int zxi2c_probe(struct platform_device *pdev)
>  	if (error)
>  		return error;
>  
> +	i2c->irq = platform_get_irq(pdev, 0);
> +	if (i2c->irq < 0)
> +		return i2c->irq;
> +
> +	error = devm_request_irq(&pdev->dev, i2c->irq, zxi2c_isr,
> +			       IRQF_SHARED, pdev->name, i2c);

I took the freedom of re-alligning here.

Queued to i2c/i2c-host-fixes with Tested-by Hans.

Thanks,
Andi




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux