File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1359,7 +1359,6 @@ static int rza1_pinctrl_register(struct rza1_pinctrl *rza1_pctl)
13591359static int rza1_pinctrl_probe (struct platform_device * pdev )
13601360{
13611361 struct rza1_pinctrl * rza1_pctl ;
1362- struct resource * res ;
13631362 int ret ;
13641363
13651364 rza1_pctl = devm_kzalloc (& pdev -> dev , sizeof (* rza1_pctl ), GFP_KERNEL );
@@ -1368,8 +1367,7 @@ static int rza1_pinctrl_probe(struct platform_device *pdev)
13681367
13691368 rza1_pctl -> dev = & pdev -> dev ;
13701369
1371- res = platform_get_resource (pdev , IORESOURCE_MEM , 0 );
1372- rza1_pctl -> base = devm_ioremap_resource (& pdev -> dev , res );
1370+ rza1_pctl -> base = devm_platform_ioremap_resource (pdev , 0 );
13731371 if (IS_ERR (rza1_pctl -> base ))
13741372 return PTR_ERR (rza1_pctl -> base );
13751373
Original file line number Diff line number Diff line change @@ -412,8 +412,10 @@ static int rzn1_dt_node_to_map(struct pinctrl_dev *pctldev,
412412
413413 for_each_child_of_node (np , child ) {
414414 ret = rzn1_dt_node_to_map_one (pctldev , child , map , num_maps );
415- if (ret < 0 )
415+ if (ret < 0 ) {
416+ of_node_put (child );
416417 return ret ;
418+ }
417419 }
418420
419421 return 0 ;
@@ -792,8 +794,10 @@ static int rzn1_pinctrl_parse_functions(struct device_node *np,
792794 grp = & ipctl -> groups [ipctl -> ngroups ];
793795 grp -> func = func -> name ;
794796 ret = rzn1_pinctrl_parse_groups (child , grp , ipctl );
795- if (ret < 0 )
797+ if (ret < 0 ) {
798+ of_node_put (child );
796799 return ret ;
800+ }
797801 i ++ ;
798802 ipctl -> ngroups ++ ;
799803 }
@@ -838,8 +842,10 @@ static int rzn1_pinctrl_probe_dt(struct platform_device *pdev,
838842
839843 for_each_child_of_node (np , child ) {
840844 ret = rzn1_pinctrl_parse_functions (child , ipctl , i ++ );
841- if (ret < 0 )
845+ if (ret < 0 ) {
846+ of_node_put (child );
842847 return ret ;
848+ }
843849 }
844850
845851 return 0 ;
Original file line number Diff line number Diff line change @@ -255,18 +255,13 @@ static int gpio_pin_setup(struct sh_pfc_chip *chip)
255255#ifdef CONFIG_PINCTRL_SH_FUNC_GPIO
256256static int gpio_function_request (struct gpio_chip * gc , unsigned offset )
257257{
258- static bool __print_once ;
259258 struct sh_pfc * pfc = gpio_to_pfc (gc );
260259 unsigned int mark = pfc -> info -> func_gpios [offset ].enum_id ;
261260 unsigned long flags ;
262261 int ret ;
263262
264- if (!__print_once ) {
265- dev_notice (pfc -> dev ,
266- "Use of GPIO API for function requests is deprecated."
267- " Convert to pinctrl\n" );
268- __print_once = true;
269- }
263+ dev_notice_once (pfc -> dev ,
264+ "Use of GPIO API for function requests is deprecated, convert to pinctrl\n" );
270265
271266 if (mark == 0 )
272267 return - EINVAL ;
You can’t perform that action at this time.
0 commit comments