mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
mfd: stmpe: Constify static struct resource
Constify a couple of static struct resource. The only usage of the structs is to assign their address to the resources field in the mfd_cell struct. This allows the compiler to put them in read-only memory. Done with the help of Coccinelle. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
committed by
Lee Jones
parent
5a1acf2b93
commit
8d7b3a6dac
@@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(stmpe_set_altfunc);
|
|||||||
* GPIO (all variants)
|
* GPIO (all variants)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct resource stmpe_gpio_resources[] = {
|
static const struct resource stmpe_gpio_resources[] = {
|
||||||
/* Start and end filled dynamically */
|
/* Start and end filled dynamically */
|
||||||
{
|
{
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
@@ -336,7 +336,7 @@ static const struct mfd_cell stmpe_gpio_cell_noirq = {
|
|||||||
* Keypad (1601, 2401, 2403)
|
* Keypad (1601, 2401, 2403)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct resource stmpe_keypad_resources[] = {
|
static const struct resource stmpe_keypad_resources[] = {
|
||||||
{
|
{
|
||||||
.name = "KEYPAD",
|
.name = "KEYPAD",
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
@@ -357,7 +357,7 @@ static const struct mfd_cell stmpe_keypad_cell = {
|
|||||||
/*
|
/*
|
||||||
* PWM (1601, 2401, 2403)
|
* PWM (1601, 2401, 2403)
|
||||||
*/
|
*/
|
||||||
static struct resource stmpe_pwm_resources[] = {
|
static const struct resource stmpe_pwm_resources[] = {
|
||||||
{
|
{
|
||||||
.name = "PWM0",
|
.name = "PWM0",
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
@@ -445,7 +445,7 @@ static struct stmpe_variant_info stmpe801_noirq = {
|
|||||||
* Touchscreen (STMPE811 or STMPE610)
|
* Touchscreen (STMPE811 or STMPE610)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct resource stmpe_ts_resources[] = {
|
static const struct resource stmpe_ts_resources[] = {
|
||||||
{
|
{
|
||||||
.name = "TOUCH_DET",
|
.name = "TOUCH_DET",
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
@@ -467,7 +467,7 @@ static const struct mfd_cell stmpe_ts_cell = {
|
|||||||
* ADC (STMPE811)
|
* ADC (STMPE811)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct resource stmpe_adc_resources[] = {
|
static const struct resource stmpe_adc_resources[] = {
|
||||||
{
|
{
|
||||||
.name = "STMPE_TEMP_SENS",
|
.name = "STMPE_TEMP_SENS",
|
||||||
.flags = IORESOURCE_IRQ,
|
.flags = IORESOURCE_IRQ,
|
||||||
|
Reference in New Issue
Block a user