From patchwork Thu Feb 9 15:09:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9564851 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 395016020C for ; Thu, 9 Feb 2017 15:18:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 251D428533 for ; Thu, 9 Feb 2017 15:18:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1644328535; Thu, 9 Feb 2017 15:18:29 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 C11DC28533 for ; Thu, 9 Feb 2017 15:18:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753510AbdBIPSQ (ORCPT ); Thu, 9 Feb 2017 10:18:16 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:57722 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752628AbdBIPQp (ORCPT ); Thu, 9 Feb 2017 10:16:45 -0500 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0MLFtx-1cc7T70jQ1-000Mdo; Thu, 09 Feb 2017 16:09:44 +0100 From: Arnd Bergmann To: Philipp Zabel , Mauro Carvalho Chehab Cc: Arnd Bergmann , Michael Tretter , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] coda/imx-vdoa: platform_driver should not be const Date: Thu, 9 Feb 2017 16:09:08 +0100 Message-Id: <20170209150940.1167088-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:eCE5b7oRUXiTJOimtzy9FBJsYa8jCAlNHrrddFbpyNN3GzX1n+Q IYvTZ0i5/3bt96vx8NcDRxaZ/dU7HzwI/u6hv+aLG6ZpzirdeXn2sml0a5/ZUkCkdfVAAn2 efXCguibkFUd1su/zaASMSms/VdIAE9YwDG75HBSrTZlJwD87SpH3hW0HXyALF5iFmjQOE5 RWqIxm4ZKfuXRixJkuhkQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:/OVVIHsDMuY=:RDtSw5Li4r26wXORdd06v3 UbQhsjXuBOiISA82jtVg6o5Bz635T7WB7sJ0Je9Lh4Xg12WEaIOuLvXS6pNxUjLK2RPpbw3rb /lXUtZZ69m7C65G30r91lsAsphiqqjQR7EUak1bleBKfklAhVKkj3fuLWSct0CGF+wELE7NPI 7Sdcx7YZSOxtBoikTSLH7VJuj/GEulpNWCJrWbjlMRiG/lGxkjxN2fKh5OSISrViQzr8Z9drj 1UOu7S2hwxV/XHMmN8HNeWPb+kltAGlFBu/sb7jUrBmAT4Tv66lFsm8/N6Er1fXo+7miN/aAW AT/2IhbqO1iv+8k4JMNU/SMtDbXIvieJw1HHdkkd8DvjM9DtabrzNGSopjLPH7DU8j+zl+6sd WXJjSZDXcQqNKoA7rGCNMqPX5xBozjBUkjaumIyWcWa1f8/hBsSC2osWj0BnnRZ8oSxCwmEo5 yQ7QA66vtHPZmvTiarFsDIziNs9esM328eeO0kpnlXBx/7alNkOF+BtCVrIlqyAmHK01pqplS um9P6FOR+MDlUYvOB4qwqM1GytItcXecqC8UGuVt8siSsGoLKnmb9fSZCVtQCqpWXkqoiZebF b8iGNg5W6xi+dlD/ZO5rCRbrLFpFTe+3CNFZgF5HXO/Xml/gVXqJiydzqYinrrX1SKEYxwMse 80/0H9Ldzr6vC1VhbLBhUxFdrrkDT3J4xVPUICfhmg6z63SAR+YpJFA+tHMz8DHMhT6E= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The device driver platform is actually written to during registration, for setting the owner field, so platform_driver_register() does not take a const pointer: drivers/media/platform/coda/imx-vdoa.c: In function 'vdoa_driver_init': drivers/media/platform/coda/imx-vdoa.c:333:213: error: passing argument 1 of '__platform_driver_register' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] module_platform_driver(vdoa_driver); In file included from drivers/media/platform/coda/imx-vdoa.c:22:0: include/linux/platform_device.h:199:12: note: expected 'struct platform_driver *' but argument is of type 'const struct platform_driver *' extern int __platform_driver_register(struct platform_driver *, ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/coda/imx-vdoa.c: In function 'vdoa_driver_exit': drivers/media/platform/coda/imx-vdoa.c:333:626: error: passing argument 1 of 'platform_driver_unregister' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] Remove the modifier again. Fixes: d2fe28feaebb ("[media] coda/imx-vdoa: constify structs") Signed-off-by: Arnd Bergmann --- drivers/media/platform/coda/imx-vdoa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/coda/imx-vdoa.c b/drivers/media/platform/coda/imx-vdoa.c index 67fd8ffa60a4..669a4c82f1ff 100644 --- a/drivers/media/platform/coda/imx-vdoa.c +++ b/drivers/media/platform/coda/imx-vdoa.c @@ -321,7 +321,7 @@ static const struct of_device_id vdoa_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, vdoa_dt_ids); -static const struct platform_driver vdoa_driver = { +static struct platform_driver vdoa_driver = { .probe = vdoa_probe, .remove = vdoa_remove, .driver = {