7777#define RZG2L_SINGLE_PIN BIT(31)
7878#define RZG2L_SINGLE_PIN_PACK (p , b , f ) (RZG2L_SINGLE_PIN | \
7979 ((p) << 24) | ((b) << 20) | (f))
80- #define RZG2L_SINGLE_PIN_GET_PORT (x ) (((x) & GENMASK(30, 24)) >> 24)
80+ #define RZG2L_SINGLE_PIN_GET_PORT_OFFSET (x ) (((x) & GENMASK(30, 24)) >> 24)
8181#define RZG2L_SINGLE_PIN_GET_BIT (x ) (((x) & GENMASK(22, 20)) >> 20)
8282#define RZG2L_SINGLE_PIN_GET_CFGS (x ) ((x) & GENMASK(19, 0))
8383
@@ -432,18 +432,18 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev,
432432 enum pin_config_param param = pinconf_to_config_param (* config );
433433 const struct pinctrl_pin_desc * pin = & pctrl -> desc .pins [_pin ];
434434 unsigned int * pin_data = pin -> drv_data ;
435+ u32 port_offset = 0 , reg ;
435436 unsigned int arg = 0 ;
436437 unsigned long flags ;
437438 void __iomem * addr ;
438- u32 port = 0 , reg ;
439439 u32 cfg = 0 ;
440440 u8 bit = 0 ;
441441
442442 if (!pin_data )
443443 return - EINVAL ;
444444
445445 if (* pin_data & RZG2L_SINGLE_PIN ) {
446- port = RZG2L_SINGLE_PIN_GET_PORT (* pin_data );
446+ port_offset = RZG2L_SINGLE_PIN_GET_PORT_OFFSET (* pin_data );
447447 cfg = RZG2L_SINGLE_PIN_GET_CFGS (* pin_data );
448448 bit = RZG2L_SINGLE_PIN_GET_BIT (* pin_data );
449449 }
@@ -454,7 +454,7 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev,
454454 return - EINVAL ;
455455 spin_lock_irqsave (& pctrl -> lock , flags );
456456 /* handle _L/_H for 32-bit register read/write */
457- addr = pctrl -> base + IEN (port );
457+ addr = pctrl -> base + IEN (port_offset );
458458 if (bit >= 4 ) {
459459 bit -= 4 ;
460460 addr += 4 ;
@@ -502,9 +502,9 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev,
502502 const struct pinctrl_pin_desc * pin = & pctrl -> desc .pins [_pin ];
503503 unsigned int * pin_data = pin -> drv_data ;
504504 enum pin_config_param param ;
505+ u32 port_offset = 0 , reg ;
505506 unsigned long flags ;
506507 void __iomem * addr ;
507- u32 port = 0 , reg ;
508508 unsigned int i ;
509509 u32 cfg = 0 ;
510510 u8 bit = 0 ;
@@ -513,7 +513,7 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev,
513513 return - EINVAL ;
514514
515515 if (* pin_data & RZG2L_SINGLE_PIN ) {
516- port = RZG2L_SINGLE_PIN_GET_PORT (* pin_data );
516+ port_offset = RZG2L_SINGLE_PIN_GET_PORT_OFFSET (* pin_data );
517517 cfg = RZG2L_SINGLE_PIN_GET_CFGS (* pin_data );
518518 bit = RZG2L_SINGLE_PIN_GET_BIT (* pin_data );
519519 }
@@ -529,7 +529,7 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev,
529529 return - EINVAL ;
530530
531531 /* handle _L/_H for 32-bit register read/write */
532- addr = pctrl -> base + IEN (port );
532+ addr = pctrl -> base + IEN (port_offset );
533533 if (bit >= 4 ) {
534534 bit -= 4 ;
535535 addr += 4 ;
0 commit comments