Skip to content

Commit a376cd9

Browse files
goyalbhumikableungatchromium
authored andcommitted
platform/chrome: chromeos_laptop: make chromeos_laptop const
Declare chromeos_laptop structures as const as they are only used during a copy operation. As their value is never modified during runtime, they can be made const. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Benson Leung <bleung@chromium.org>
1 parent 4398ef0 commit a376cd9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

drivers/platform/chrome/chromeos_laptop.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ static int chromeos_laptop_probe(struct platform_device *pdev)
423423
return ret;
424424
}
425425

426-
static struct chromeos_laptop samsung_series_5_550 = {
426+
static const struct chromeos_laptop samsung_series_5_550 = {
427427
.i2c_peripherals = {
428428
/* Touchpad. */
429429
{ .add = setup_cyapa_tp, I2C_ADAPTER_SMBUS },
@@ -432,14 +432,14 @@ static struct chromeos_laptop samsung_series_5_550 = {
432432
},
433433
};
434434

435-
static struct chromeos_laptop samsung_series_5 = {
435+
static const struct chromeos_laptop samsung_series_5 = {
436436
.i2c_peripherals = {
437437
/* Light Sensor. */
438438
{ .add = setup_tsl2583_als, I2C_ADAPTER_SMBUS },
439439
},
440440
};
441441

442-
static struct chromeos_laptop chromebook_pixel = {
442+
static const struct chromeos_laptop chromebook_pixel = {
443443
.i2c_peripherals = {
444444
/* Touch Screen. */
445445
{ .add = setup_atmel_1664s_ts, I2C_ADAPTER_PANEL },
@@ -450,14 +450,14 @@ static struct chromeos_laptop chromebook_pixel = {
450450
},
451451
};
452452

453-
static struct chromeos_laptop hp_chromebook_14 = {
453+
static const struct chromeos_laptop hp_chromebook_14 = {
454454
.i2c_peripherals = {
455455
/* Touchpad. */
456456
{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
457457
},
458458
};
459459

460-
static struct chromeos_laptop dell_chromebook_11 = {
460+
static const struct chromeos_laptop dell_chromebook_11 = {
461461
.i2c_peripherals = {
462462
/* Touchpad. */
463463
{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
@@ -466,28 +466,28 @@ static struct chromeos_laptop dell_chromebook_11 = {
466466
},
467467
};
468468

469-
static struct chromeos_laptop toshiba_cb35 = {
469+
static const struct chromeos_laptop toshiba_cb35 = {
470470
.i2c_peripherals = {
471471
/* Touchpad. */
472472
{ .add = setup_cyapa_tp, I2C_ADAPTER_DESIGNWARE_0 },
473473
},
474474
};
475475

476-
static struct chromeos_laptop acer_c7_chromebook = {
476+
static const struct chromeos_laptop acer_c7_chromebook = {
477477
.i2c_peripherals = {
478478
/* Touchpad. */
479479
{ .add = setup_cyapa_tp, I2C_ADAPTER_SMBUS },
480480
},
481481
};
482482

483-
static struct chromeos_laptop acer_ac700 = {
483+
static const struct chromeos_laptop acer_ac700 = {
484484
.i2c_peripherals = {
485485
/* Light Sensor. */
486486
{ .add = setup_tsl2563_als, I2C_ADAPTER_SMBUS },
487487
},
488488
};
489489

490-
static struct chromeos_laptop acer_c720 = {
490+
static const struct chromeos_laptop acer_c720 = {
491491
.i2c_peripherals = {
492492
/* Touchscreen. */
493493
{ .add = setup_atmel_1664s_ts, I2C_ADAPTER_DESIGNWARE_1 },
@@ -500,14 +500,14 @@ static struct chromeos_laptop acer_c720 = {
500500
},
501501
};
502502

503-
static struct chromeos_laptop hp_pavilion_14_chromebook = {
503+
static const struct chromeos_laptop hp_pavilion_14_chromebook = {
504504
.i2c_peripherals = {
505505
/* Touchpad. */
506506
{ .add = setup_cyapa_tp, I2C_ADAPTER_SMBUS },
507507
},
508508
};
509509

510-
static struct chromeos_laptop cr48 = {
510+
static const struct chromeos_laptop cr48 = {
511511
.i2c_peripherals = {
512512
/* Light Sensor. */
513513
{ .add = setup_tsl2563_als, I2C_ADAPTER_SMBUS },

0 commit comments

Comments
 (0)