lkml.org 
[lkml]   [2020]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/6] iio: dac: ad5380: Constify struct iio_chan_spec_ext_info
    Date
    ad5380_ext_info is not modified and can be made const to allow the
    compiler to put it in read-only memory.

    Before:
    text data bss dec hex filename
    12060 3280 192 15532 3cac drivers/iio/dac/ad5380.o

    After:
    text data bss dec hex filename
    12252 3088 192 15532 3cac drivers/iio/dac/ad5380.o

    Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
    ---
    drivers/iio/dac/ad5380.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/iio/dac/ad5380.c b/drivers/iio/dac/ad5380.c
    index b37e5675f716..04c74cc1a4ec 100644
    --- a/drivers/iio/dac/ad5380.c
    +++ b/drivers/iio/dac/ad5380.c
    @@ -240,7 +240,7 @@ static const struct iio_info ad5380_info = {
    .write_raw = ad5380_write_raw,
    };

    -static struct iio_chan_spec_ext_info ad5380_ext_info[] = {
    +static const struct iio_chan_spec_ext_info ad5380_ext_info[] = {
    {
    .name = "powerdown",
    .read = ad5380_read_dac_powerdown,
    --
    2.26.2
    \
     
     \ /
      Last update: 2020-05-26 23:05    [W:4.126 / U:1.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site