File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -628,7 +628,7 @@ static int pwrseq_match_device(struct device *pwrseq_dev, void *data)
628
628
return 0 ;
629
629
630
630
ret = pwrseq -> match (pwrseq , match_data -> dev );
631
- if (ret <= 0 )
631
+ if (ret == PWRSEQ_NO_MATCH || ret < 0 )
632
632
return ret ;
633
633
634
634
/* We got the matching device, let's find the right target. */
@@ -651,7 +651,7 @@ static int pwrseq_match_device(struct device *pwrseq_dev, void *data)
651
651
652
652
match_data -> desc -> pwrseq = pwrseq_device_get (pwrseq );
653
653
654
- return 1 ;
654
+ return PWRSEQ_MATCH_OK ;
655
655
}
656
656
657
657
/**
@@ -684,7 +684,7 @@ struct pwrseq_desc *pwrseq_get(struct device *dev, const char *target)
684
684
pwrseq_match_device );
685
685
if (ret < 0 )
686
686
return ERR_PTR (ret );
687
- if (ret == 0 )
687
+ if (ret == PWRSEQ_NO_MATCH )
688
688
/* No device matched. */
689
689
return ERR_PTR (- EPROBE_DEFER );
690
690
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ struct pwrseq_device;
13
13
typedef int (* pwrseq_power_state_func )(struct pwrseq_device * );
14
14
typedef int (* pwrseq_match_func )(struct pwrseq_device * , struct device * );
15
15
16
+ #define PWRSEQ_NO_MATCH 0
17
+ #define PWRSEQ_MATCH_OK 1
18
+
16
19
/**
17
20
* struct pwrseq_unit_data - Configuration of a single power sequencing
18
21
* unit.
You can’t perform that action at this time.
0 commit comments