Re: [PATCH] staging: nvec: convert to use platform register andmfd cells

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

 



Hi Joe,

On Sunday 24 July 2011 23:01:19 Joe Perches wrote:
> On Sun, 2011-07-24 at 21:56 +0200, Marc Dietrich wrote:
> > This patch converts the nvec to use mfd cells and improves the
> > registration of the platform driver. The child drivers are also
> > converted to use mfd cells and platform registration.
> 
> trivia:
> > diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
> 
> []
> 
> > @@ -23,6 +23,7 @@
> 
> []
> 
> >  static unsigned char EC_DISABLE_EVENT_REPORTING[]
> >  =	{'\x04','\x00','\x00'};
> 
> Please use const where appropriate.

while these message strings are constant most of the time, there are
places where they aren't. So the nvec_write_{a}sync functions (which
are feeded by these strings) cannot be called with a const argument.

I know this looks ugly and I plan to replace these with some macros
which build up the string. This will also help to explain the deeper
meaning of them.

> > @@ -31,6 +32,25 @@ static unsigned char EC_GET_FIRMWARE_VERSION[]
> > =	{'\x07','\x15'};\
> 
> []
> 
> > +static struct mfd_cell nvec_devices[] = {
> 
> const?

same here, mfd_add_devices requires a non-const argument.

> > +	{
> > +		.name	= "nvec-kbd",
> > +		.id	= 1,
> > +	},
> 
> []
> 
> > @@ -367,20 +380,21 @@ static int __devinit tegra_nvec_probe(struct
> > platform_device *pdev)
> > 
> >  	INIT_WORK(&nvec->rx_work, nvec_dispatch);
> >  	INIT_WORK(&nvec->tx_work, nvec_request_master);
> > 
> > +	err = request_irq(nvec->irq, nvec_interrupt, 0, "nvec", nvec);
> > +	if (err) {
> > +		dev_err(nvec->dev, "couldn't request irq");
> 
> Add terminating "\n" please.

ok, included in the next version.

Marc
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux