From patchwork Fri May 12 10:17:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 9723853 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7775B600CB for ; Fri, 12 May 2017 10:17:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69BAD287EE for ; Fri, 12 May 2017 10:17:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AF94287FB; Fri, 12 May 2017 10:17:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA3BD287EE for ; Fri, 12 May 2017 10:17:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbdELKR6 (ORCPT ); Fri, 12 May 2017 06:17:58 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33358 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751266AbdELKR5 (ORCPT ); Fri, 12 May 2017 06:17:57 -0400 Received: by mail-wm0-f67.google.com with SMTP id y10so12880237wmh.0 for ; Fri, 12 May 2017 03:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=0FmHZSlJUBkBzT8byVm6yP1jr0/zpRv9d0vhmmiBzVw=; b=jBMaqMy9+Sw7WCCeAAFa+zB1WKuqfef3twSXhe1A6W0rCBrfJSH37tb4UnhewrtTkh k0YlJX1qsyZIx3hLKw0A2lUWCWRM76b0deD3MDU3FXqIi+bvL9/IU6g6cMoWjIwc3BLB DZJq5YA5Bh/9c//i30ymJGn6j6xD5MZaqzzBeceh9ixtDx5SxKB6RNale34KjqTt8zMM v2t18ub6A28hquDAZB7UspasGPgFJcR3MYvmHCDIZz8/hW4BYZJRSqU2fI+UMErL6Pxy iFF0NPzfjfgASGBrXi5+F81ktJazMWwxufGJtaeEgUmpCEEFEAC7p/dmhD2NIGXhe87O cPzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=0FmHZSlJUBkBzT8byVm6yP1jr0/zpRv9d0vhmmiBzVw=; b=pQt9Nbnsal0Fc5UZtSuo8O3Zd+9e1DQXwH1zxGFfnygF6VuuWARe8NFi2TCouu42DC DAAPUig5CckosG5YjbZ0I3clfwxAj0i3b2du26HxFYi7D65dG3tU0cgSZF8+Ks8lgVzI DyPCNIkD44KCoAXXQPrLWXGJRZNpwLsiuUCyXf0+H1j3pbEQMCnkvfDLK//EIqJtU52J 2t9S6aDUejR4uLLuGpG7aKcPfrlvgZjMKOfvFnvL1am4XC9iN+D3A3n0Lr0f8VPN0Q+H 5E7HBw57S92Wrh6ODkmJXJmpJeX2ffa8Pc7xDL/yNySERfjUeNEXcFTfH41jHGAk6L99 1VhQ== X-Gm-Message-State: AODbwcCsua8dq6YeAgtu4DRwOzU3oq+T+11UDA55AEUqknmvqefSj0mO rhdJKJ01ESpxBA== X-Received: by 10.25.16.232 with SMTP id 101mr896599lfq.54.1494584276463; Fri, 12 May 2017 03:17:56 -0700 (PDT) Received: from xi.terra (c-42c8e255.07-184-6d6c6d4.cust.bredbandsbolaget.se. [85.226.200.66]) by smtp.gmail.com with ESMTPSA id t6sm499242ljd.1.2017.05.12.03.17.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 03:17:55 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.89) (envelope-from ) id 1d97du-0000aK-L8; Fri, 12 May 2017 12:17:50 +0200 From: Johan Hovold To: Bartlomiej Zolnierkiewicz Cc: Steve Glendinning , Bernie Thompson , linux-fbdev@vger.kernel.org, Johan Hovold Subject: [PATCH] video: fbdev: add missing USB-descriptor endianness conversions Date: Fri, 12 May 2017 12:17:25 +0200 Message-Id: <20170512101725.2207-1-johan@kernel.org> X-Mailer: git-send-email 2.13.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the missing endianness conversions when printing the USB device-descriptor idVendor, idProduct and bcdDevice fields during probe. Signed-off-by: Johan Hovold --- drivers/video/fbdev/smscufx.c | 5 +++-- drivers/video/fbdev/udlfb.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/smscufx.c b/drivers/video/fbdev/smscufx.c index ec2e7e353685..449fceaf79d5 100644 --- a/drivers/video/fbdev/smscufx.c +++ b/drivers/video/fbdev/smscufx.c @@ -1646,8 +1646,9 @@ static int ufx_usb_probe(struct usb_interface *interface, dev_dbg(dev->gdev, "%s %s - serial #%s\n", usbdev->manufacturer, usbdev->product, usbdev->serial); dev_dbg(dev->gdev, "vid_%04x&pid_%04x&rev_%04x driver's ufx_data struct at %p\n", - usbdev->descriptor.idVendor, usbdev->descriptor.idProduct, - usbdev->descriptor.bcdDevice, dev); + le16_to_cpu(usbdev->descriptor.idVendor), + le16_to_cpu(usbdev->descriptor.idProduct), + le16_to_cpu(usbdev->descriptor.bcdDevice), dev); dev_dbg(dev->gdev, "console enable=%d\n", console); dev_dbg(dev->gdev, "fb_defio enable=%d\n", fb_defio); diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c index 6a3c353de7c3..a868cbb51a34 100644 --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c @@ -1613,8 +1613,9 @@ static int dlfb_usb_probe(struct usb_interface *interface, pr_info("%s %s - serial #%s\n", usbdev->manufacturer, usbdev->product, usbdev->serial); pr_info("vid_%04x&pid_%04x&rev_%04x driver's dlfb_data struct at %p\n", - usbdev->descriptor.idVendor, usbdev->descriptor.idProduct, - usbdev->descriptor.bcdDevice, dev); + le16_to_cpu(usbdev->descriptor.idVendor), + le16_to_cpu(usbdev->descriptor.idProduct), + le16_to_cpu(usbdev->descriptor.bcdDevice), dev); pr_info("console enable=%d\n", console); pr_info("fb_defio enable=%d\n", fb_defio); pr_info("shadow enable=%d\n", shadow);