Re: [PATCH 2/2] tty: of_serial: support for 32 bit accesses

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

 



On Wed, Jun 15, 2011 at 07:27:48AM -0600, Grant Likely wrote:
> On Wed, Jun 15, 2011 at 6:49 AM, Jamie Iles <jamie@xxxxxxxxxxxxx> wrote:
[...]
> > diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
> > index 4675243..50810a0 100644
> > --- a/drivers/tty/serial/of_serial.c
> > +++ b/drivers/tty/serial/of_serial.c
> > @@ -65,6 +65,23 @@ static int __devinit of_platform_serial_setup(struct platform_device *ofdev,
> >
> >        port->irq = irq_of_parse_and_map(np, 0);
> >        port->iotype = UPIO_MEM;
> > +       prop = of_get_property(np, "io-width", &prop_size);
> > +       if (prop && (prop_size == sizeof(u32))) {
> > +               switch (be32_to_cpup(prop)) {
> > +               case 1:
> > +                       port->iotype = UPIO_MEM;
> > +                       break;
> > +               case 4:
> > +                       port->iotype = UPIO_MEM32;
> > +                       break;
> > +               default:
> > +                       dev_warn(&ofdev->dev,
> > +                                "unsupported io width (%d bytes)\n",
> > +                                be32_to_cpup(prop));
> > +                       return -EINVAL;
> 
> Nit: since this is failing out, it should be dev_err instead of
> dev_warn, but otherwise:
> 
> Acked-by: Grant Likely <grant.likely@xxxxxxxxxxxx>

OK, thanks.  I'll wait for some comments on the binding documentation 
for the of_serial driver then repost with the change to dev_err().

Thanks,

Jamie
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux