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: 10904203 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 135C314DB for ; Tue, 16 Apr 2019 20:41:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECFE228A51 for ; Tue, 16 Apr 2019 20:41:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAE8528A54; Tue, 16 Apr 2019 20:41:27 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7AF09281C3 for ; Tue, 16 Apr 2019 20:41:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 375CD89C69; Tue, 16 Apr 2019 20:41:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9127389C69 for ; Tue, 16 Apr 2019 20:41:23 +0000 (UTC) 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 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:FIr7A6TtAQs=:sUi9Fws/rIsLseGx11yD2n wob4xGRJS/nLIPO+2sHS/YpN5kAzc2hYHGKhcMCLBT8AcS/9minqqsZENR94ZcjXY6v7U7j5D umPtTpaAo2ih+PmTJvXxCfWUyGc1csiy990MiH+sHyVmQRaSqnfw7YErjWLN9092UJmjG6hYN zva4tRxpuxZjD9yUcvKguI94V3zxNEMZaz3hze1IE1EMV7kBzepvzxtVEV9MGbIWl+/BN+XN1 nZCvoSaC2EKVRAcAH+C1WCIiMXNGv64EEfEfULbQt+pfeOeapuuxgyI8kWCJFjlrGtE1gLqW0 T7IM+XOiLxyEc++YbAN3jYyB/PR4zpYXdnpTBRDcNNuAjGNo4+QCic+H1roA5gfBcgnBTpyRi 8AWzBQAbli50Zw4Pf1R4kCyuAKqu1uJ3n80QQdb2ZYJPpGp8yjz2R8gnB+B2j09G49JPpgIVv DL20fKu8XYxhnj8qz1rRqhG5Xs06aJO7HMe6VpvORdzeLl0FtEL2OexGqEI6i55rpYHYZlMgU fv2ai6myRsjJplePK74gWVefpu9p/5rzoZLlauM5IxR4SH/MKaIea0WObMADuOuzha3DtqOJ4 U63T7Jl5AidMkmu9wTdNnVpZ3YwlyqoWzIqO1T5kVnCbl2MP/5WFNLYizM5nu5msdL3HS0qMQ s0DP/UlUmT2ZDCOLnBfiG4R7f7bmncDUYLfWkAc7Q1D9ffAl+f10Fax9owqtumMWZimh41uFh 9nbb3QNGsSFhG+IiXGF0aFg57ZeDM4eIu1N7WQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Arnd Bergmann , Bartlomiej Zolnierkiewicz , y2038@lists.linaro.org, =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mikulas Patocka , linux-fsdevel@vger.kernel.org, "David S. Miller" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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)