From patchwork Tue Aug 16 09:27:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9283027 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 C323560574 for ; Tue, 16 Aug 2016 09:27:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B322928606 for ; Tue, 16 Aug 2016 09:27:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A739528CA8; Tue, 16 Aug 2016 09:27:55 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 55F8728606 for ; Tue, 16 Aug 2016 09:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753481AbcHPJ1c (ORCPT ); Tue, 16 Aug 2016 05:27:32 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36433 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753146AbcHPJ13 (ORCPT ); Tue, 16 Aug 2016 05:27:29 -0400 Received: by mail-wm0-f65.google.com with SMTP id i138so15289157wmf.3; Tue, 16 Aug 2016 02:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=mOe8lqPU5hdlzb0yh+hmrPUJN3uw3EWNC1nL8zinUfw=; b=0SHqJMFxtIl9HdKVjE0fKs0ybw1UpdNGWF+L8VKDOzUcHhBPGRIQSSiwJKDiFHAiGP OT1G6vbndiLO9+6IBgo3jr8e7nWj487GitzVfP+0ngy3d6awKY2PkVw29TrGO2PBoE7c uw/wpKq/ncQDuC5pK1B358+zrcfFaA03xYyRoLwe6fFe9muvNZE3RvvsHIDjlP38mPvU mlpHA0TL8s6egckYLIfn+tsMr0zzDOE/ypE18kSujcvYyT8MYA0ABZElBaCnIeP8sqL4 4vwgXRICu0NMV6C0UDi1u0wbEGC+rnaNhGdAdkKvM6MfM55BzoUeg9ktdxfrzvgKs4xL YeOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mOe8lqPU5hdlzb0yh+hmrPUJN3uw3EWNC1nL8zinUfw=; b=XZ/7gOXxOI+Y4AghC1nHzhPcp3dnt7hhXUtT7YMto8nU9XOquxX7AVvZTQtJDIooZP XXCq9cs7zMSZLX5uDwqUlix/CwLVEqsZcsI6a3LccshMXqeAhau2HoT+Rvy4UiiLx1Qw 5dD2qDcxSkcQ5oBFyPMq0D2zoyTNo//iBDqkn4M0qiXiG3KowX9zd3VbmnDln9EU3n+3 F0TNfecAgCxvXbeUw9mXy/rLLgxKQQLGmum8KtszdObeE7m1WSqPo7gx2S5T+E37zW+E toHgcneNxLAh08t3UOALO3k41ilVgKaQTxGgvVb4FUH7455aUzzar3fJXO7OimetBYAa 4HIg== X-Gm-Message-State: AEkoouv2LB9virwGd14Nzw2wbqM0XrqQIUjSxYeDyZY0ibakWhChp4tcQcXGsDmHvmT18g== X-Received: by 10.28.31.133 with SMTP id f127mr20995059wmf.90.1471339647749; Tue, 16 Aug 2016 02:27:27 -0700 (PDT) Received: from Red.local (ANice-651-1-389-119.w86-205.abo.wanadoo.fr. [86.205.21.119]) by smtp.googlemail.com with ESMTPSA id a184sm21602754wmh.1.2016.08.16.02.27.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Aug 2016 02:27:27 -0700 (PDT) From: LABBE Corentin To: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, LABBE Corentin Subject: [PATCH 1/2] fbdev: ssd1307fb: constify the device_info pointer Date: Tue, 16 Aug 2016 11:27:17 +0200 Message-Id: <1471339638-25134-1-git-send-email-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.7.3 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 of_match_device return const data, so instead of casting its return value this patch constify the device_info pointer. Signed-off-by: LABBE Corentin --- drivers/video/fbdev/ssd1307fb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index a9c45c8..b6c9ecf 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -64,7 +64,7 @@ struct ssd1307fb_par { u32 contrast; u32 dclk_div; u32 dclk_frq; - struct ssd1307fb_deviceinfo *device_info; + const struct ssd1307fb_deviceinfo *device_info; struct i2c_client *client; u32 height; struct fb_info *info; @@ -559,8 +559,8 @@ static int ssd1307fb_probe(struct i2c_client *client, par->info = info; par->client = client; - par->device_info = (struct ssd1307fb_deviceinfo *)of_match_device( - ssd1307fb_of_match, &client->dev)->data; + par->device_info = of_match_device(ssd1307fb_of_match, + &client->dev)->data; par->reset = of_get_named_gpio(client->dev.of_node, "reset-gpios", 0);