From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751696AbdI3QhZ (ORCPT ); Sat, 30 Sep 2017 12:37:25 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33020 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbdI3QhW (ORCPT ); Sat, 30 Sep 2017 12:37:22 -0400 X-Google-Smtp-Source: AOwi7QCR6OE+LQukJ1YB3qFl9AjaVfiCi5ur3lHibmKN2BgGrInEpUXKxwrVd6CVURm0iTjgoiZDPw== From: Bhumika Goyal To: julia.lawall@lip6.fr, andreas.noever@gmail.com, michael.jamet@intel.com, mika.westerberg@linux.intel.com, yehezkel.bernat@intel.com, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] thunderbolt: make tb_domain_type const Date: Sat, 30 Sep 2017 22:07:12 +0530 Message-Id: <1506789432-9967-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make this const as it is only stored in the const field of a device structure. Make the declaration in header const too. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal --- drivers/thunderbolt/domain.c | 2 +- drivers/thunderbolt/tb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c index 9f2dcd4..f8b11a3 100644 --- a/drivers/thunderbolt/domain.c +++ b/drivers/thunderbolt/domain.c @@ -65,7 +65,7 @@ static void tb_domain_release(struct device *dev) kfree(tb); } -struct device_type tb_domain_type = { +const struct device_type tb_domain_type = { .name = "thunderbolt_domain", .release = tb_domain_release, }; diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h index e0deee4..fa65049 100644 --- a/drivers/thunderbolt/tb.h +++ b/drivers/thunderbolt/tb.h @@ -369,7 +369,7 @@ static inline int tb_port_write(struct tb_port *port, const void *buffer, struct tb *tb_probe(struct tb_nhi *nhi); extern struct bus_type tb_bus_type; -extern struct device_type tb_domain_type; +extern const struct device_type tb_domain_type; extern struct device_type tb_switch_type; int tb_domain_init(void); -- 1.9.1