From patchwork Tue Apr 16 20:25:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10904137 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E1181850 for ; Tue, 16 Apr 2019 20:28:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76EA2289A6 for ; Tue, 16 Apr 2019 20:28:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B70A289FF; Tue, 16 Apr 2019 20:28:43 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 11FF0289A6 for ; Tue, 16 Apr 2019 20:28:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730608AbfDPU2T (ORCPT ); Tue, 16 Apr 2019 16:28:19 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:45069 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730446AbfDPU2C (ORCPT ); Tue, 16 Apr 2019 16:28:02 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1Mr9O4-1gSXBy2fjy-00oDbO; Tue, 16 Apr 2019 22:27:40 +0200 From: Arnd Bergmann To: Alexander Viro Cc: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Bartlomiej Zolnierkiewicz , Mikulas Patocka , "David S. Miller" , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH v3 14/26] compat_ioctl: move ATYFB_CLK handling to atyfb driver Date: Tue, 16 Apr 2019 22:25:35 +0200 Message-Id: <20190416202701.127745-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190416202701.127745-1-arnd@arndb.de> References: <20190416202013.4034148-1-arnd@arndb.de> <20190416202701.127745-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:C0I4iM7ah9sSs/Ga3OL/mLvU4BOuiuy7Hr1XtoBw48wtNdkZ4hG VCNkRnN6RAAoin8yeOfVagnup4xtdIwMoHD/ZyPmVfbBu+CW2aeKsfoSLhCmNh4xJh1xlG8 gAIXYBRAlpS9adxjA1wEA9/lr54iifHYcRnWLKNcH6O+ExkN8Rh86cO9JWbRQQ2ZyunAZ9t jN1tujqqGMMIrsLqNff/Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:Qa2ZV3CAEPE=:LnDTKzBXimzs226naIEirp DNpnQFXg0OCDzWadb705mrhnMwGUT60bdYU54RTLns2m4gVojBFcoFB2NfBGKljQEbu+v2u6b uUkHWwgPKy68miCaLLieghA+ZCKzInxMHLVJ5ncPTsacSkcpWNbr+gfwOFbMLUi6EZR2ZmrNv t92nRlHOtk1Vvd67aJM4+fEwO+YzuL6ihp0KQ3V6lqne945LuOOIwEXstQu49SXgUF0f1z0OB V7lrAlmE5RfjXln3SV/xVxOmzZk9ajL80d9UfRQJZ8/qT9gMF4tPdVrDgtuB7dOcsX5W1R63X c0dHo88D/BzP+DwWngSI5x5v/Gt+308ZRp9OBrcjByzXHuvOuUCyqHhkw7BXg7o5t1GJIs+0k 3zAXuE8ezSsKUt+5JvYta5w80vBuvOsNun01yhnrhhrkaq0gcNyvir72+tVgsytmV5wW+bLi+ RlE660ty7LgG2zwYZvkCPa6xydG8D8pI2DsdiUFUnH2C6cY7w8ueZ726Nu5/KJsDQKncotR5a nl8SHkARgb2AWwR04zR+49uUrYPnr0i++WyMQAj5/VXaXeT6kgFLxmRlKTvcQW7HotqS9DWWI nhay/HU/+3ywUkD6Enpj4eojJ067Bl2Gl0HfCVuzaSvKGI0rysTSZ6tNujr57XVh35nIFZ6xk YGw+T0y1oQ4gXu/qYjIaTxd42ZKfOFt3gE5YeNmxrLzdKJhPmOsQKAB+E9VPnKAIigaj68V+9 GMNE71R48LoRtEv0YWScJ1VEWTEQAEQLW4m37g== Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These are two obscure ioctl commands, in a driver that only has compatible commands, so just let the driver handle this itself. Signed-off-by: Arnd Bergmann Acked-by: Bartlomiej Zolnierkiewicz --- drivers/video/fbdev/aty/atyfb_base.c | 12 +++++++++++- fs/compat_ioctl.c | 2 -- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index b6fe103df145..1bc4b6672fdc 100644 --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c @@ -48,7 +48,7 @@ ******************************************************************************/ - +#include #include #include #include @@ -235,6 +235,13 @@ static int atyfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info); static int atyfb_blank(int blank, struct fb_info *info); static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg); +#ifdef CONFIG_COMPAT +static int atyfb_compat_ioctl(struct fb_info *info, u_int cmd, u_long arg) +{ + return atyfb_ioctl(info, cmd, (u_long)compat_ptr(arg)); +} +#endif + #ifdef __sparc__ static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma); #endif @@ -290,6 +297,9 @@ static struct fb_ops atyfb_ops = { .fb_pan_display = atyfb_pan_display, .fb_blank = atyfb_blank, .fb_ioctl = atyfb_ioctl, +#ifdef CONFIG_COMPAT + .fb_compat_ioctl = atyfb_compat_ioctl, +#endif .fb_fillrect = atyfb_fillrect, .fb_copyarea = atyfb_copyarea, .fb_imageblit = atyfb_imageblit, diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 6eb7a3f51702..a0f230650de2 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -637,8 +637,6 @@ COMPATIBLE_IOCTL(CAPI_CLR_FLAGS) COMPATIBLE_IOCTL(CAPI_NCCI_OPENCOUNT) COMPATIBLE_IOCTL(CAPI_NCCI_GETUNIT) /* Misc. */ -COMPATIBLE_IOCTL(0x41545900) /* ATYIO_CLKR */ -COMPATIBLE_IOCTL(0x41545901) /* ATYIO_CLKW */ COMPATIBLE_IOCTL(PCIIOC_CONTROLLER) COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_IO) COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_MEM)