This seems is fine too.

Cheers



On Sun, Oct 17, 2010 at 05:38:32PM +0600, Alexandr Shadchin wrote:
> On Sun, Oct 17, 2010 at 06:34:23AM -0400, Kenneth R Westerback wrote:
> > On Sat, Oct 16, 2010 at 09:00:43PM +0600, Alexandr Shadchin wrote:
> > > On Sat, Oct 16, 2010 at 03:42:10PM +0100, Nicholas Marriott wrote:
> > > > pmsinput could have a newline after the return type like the rest,
> > > > otherwise looks good for me.
> > > > 
> > > 
> > > I agree, did not notice :)
> > > Fixed
> > > 
> > > -- 
> > > Alexandr Shadchin
> > 
> > The diff diddn't compile due to ';' in pmsprobe(). Make sure you at least
> > compile diffs, lest we start trusting you and committing without compiling
> > ourselves!
> 
> Right now wanted to write about this error.
> I have two laptops. Second forgot to sync. I'll try to be more attentive.
> 
> > 
> > Done. Next? :-).
> > 
> > .... Ken
> 
> Simplified pmsprobe(), no functional change.
> 
> -- 
> Alexandr Shadchin
> 
> Index: pms.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pckbc/pms.c,v
> retrieving revision 1.10
> diff -u -p -r1.10 pms.c
> --- pms.c     17 Oct 2010 10:32:00 -0000      1.10
> +++ pms.c     17 Oct 2010 11:30:24 -0000
> @@ -134,21 +134,10 @@ pmsprobe(struct device *parent, void *ma
>       /* reset the device */
>       cmd[0] = PMS_RESET;
>       res = pckbc_poll_cmd(pa->pa_tag, pa->pa_slot, cmd, 1, 2, resp, 1);
> -     if (res) {
> +     if (res || resp[0] != PMS_RSTDONE || resp[1] != 0) {
>  #ifdef DEBUG
> -             printf("pmsprobe: reset error %d\n", res);
> -#endif
> -             return (0);
> -     }
> -     if (resp[0] != PMS_RSTDONE) {
> -             printf("pmsprobe: reset response 0x%x\n", resp[0]);
> -             return (0);
> -     }
> -
> -     /* get type number (0 = mouse) */
> -     if (resp[1] != 0) {
> -#ifdef DEBUG
> -             printf("pmsprobe: type 0x%x\n", resp[1]);
> +             printf("pms: reset error %d (response 0x%02x, type 0x%02x)\n",
> +                 res, resp[0], resp[1]);
>  #endif
>               return (0);
>       }

Reply via email to