From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751568AbdAVNRK (ORCPT ); Sun, 22 Jan 2017 08:17:10 -0500 Received: from saturn.retrosnub.co.uk ([178.18.118.26]:40214 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750973AbdAVNRJ (ORCPT ); Sun, 22 Jan 2017 08:17:09 -0500 Subject: Re: [PATCH] iio: industrialio-trigger: constify device_type structures To: Bhumika Goyal , julia.lawall@lip6.fr, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <1485017989-22670-1-git-send-email-bhumirks@gmail.com> From: Jonathan Cameron Message-ID: Date: Sun, 22 Jan 2017 13:17:06 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1485017989-22670-1-git-send-email-bhumirks@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/01/17 16:59, Bhumika Goyal wrote: > Declare device_type structure as const as it is only stored in the > type field of a device structure. This field is of type const, so add > const to declaration of device_type structure. > > File size before: > text data bss dec hex filename > 5389 208 48 5645 160d iio/industrialio-trigger.o > > File size after: > text data bss dec hex filename > 5453 176 48 5677 162d iio/industrialio-trigger.o > > Signed-off-by: Bhumika Goyal Makes sense. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > --- > drivers/iio/industrialio-trigger.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c > index 978729f..3257f0e 100644 > --- a/drivers/iio/industrialio-trigger.c > +++ b/drivers/iio/industrialio-trigger.c > @@ -487,7 +487,7 @@ static void iio_trig_release(struct device *device) > kfree(trig); > } > > -static struct device_type iio_trig_type = { > +static const struct device_type iio_trig_type = { > .release = iio_trig_release, > .groups = iio_trig_dev_groups, > }; >