2017-12-27 12:55:14 -06:00
|
|
|
|
2007-05-03 02:38:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-15 08:32:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-03 02:38:57 +10:00
|
|
|
|
2007-10-17 21:17:42 -07:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
2007-05-03 02:38:57 +10:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2010-06-08 07:48:20 -06:00
|
|
|
|
2010-06-08 07:48:26 -06:00
|
|
|
|
2007-05-03 02:38:57 +10:00
|
|
|
|
2017-04-10 16:51:01 +05:30
|
|
|
|
2010-06-08 07:48:26 -06:00
|
|
|
|
2007-05-03 02:38:57 +10:00
|
|
|
|
2010-06-08 07:48:21 -06:00
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
2015-03-03 09:52:20 +01:00
|
|
|
|
2016-09-19 22:21:24 +01:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-17 11:57:34 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-14 18:53:59 +01:00
|
|
|
|
2010-07-23 19:19:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-01 11:53:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-23 19:19:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-02-24 14:58:34 -07:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:14 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-21 15:40:31 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:14 -06:00
|
|
|
|
2016-10-17 12:17:43 -07:00
|
|
|
|
2010-06-08 07:48:14 -06:00
|
|
|
|
|
|
|
|
|
2012-10-08 19:42:11 -05:00
|
|
|
|
2010-06-08 07:48:14 -06:00
|
|
|
|
|
|
|
|
|
2014-05-21 15:40:31 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-27 20:00:19 -05:00
|
|
|
|
2019-06-24 14:46:20 +02:00
|
|
|
|
2010-06-08 07:48:14 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-21 15:40:31 +09:00
|
|
|
|
|
|
|
|
|
2017-06-01 18:00:00 -05:00
|
|
|
|
2014-05-21 15:40:31 +09:00
|
|
|
|
2010-06-08 07:48:14 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-22 13:59:23 -06:00
|
|
|
|
2010-06-08 07:48:14 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-07-22 13:59:23 -06:00
|
|
|
|
2010-10-10 21:35:05 -06:00
|
|
|
|
2010-06-08 07:48:15 -06:00
|
|
|
|
2010-06-08 07:48:14 -06:00
|
|
|
|
2017-08-25 18:33:13 +03:00
|
|
|
|
2010-10-20 11:45:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-07 15:23:56 -05:00
|
|
|
|
|
|
|
|
|
2010-10-10 21:35:05 -06:00
|
|
|
|
2010-06-08 07:48:15 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: kzalloc() -> kcalloc()
The kzalloc() function has a 2-factor argument form, kcalloc(). This
patch replaces cases of:
kzalloc(a * b, gfp)
with:
kcalloc(a * b, gfp)
as well as handling cases of:
kzalloc(a * b * c, gfp)
with:
kzalloc(array3_size(a, b, c), gfp)
as it's slightly less ugly than:
kzalloc_array(array_size(a, b), c, gfp)
This does, however, attempt to ignore constant size factors like:
kzalloc(4 * 1024, gfp)
though any constants defined via macros get caught up in the conversion.
Any factors with a sizeof() of "unsigned char", "char", and "u8" were
dropped, since they're redundant.
The Coccinelle script used for this was:
// Fix redundant parens around sizeof().
@@
type TYPE;
expression THING, E;
@@
(
kzalloc(
- (sizeof(TYPE)) * E
+ sizeof(TYPE) * E
, ...)
|
kzalloc(
- (sizeof(THING)) * E
+ sizeof(THING) * E
, ...)
)
// Drop single-byte sizes and redundant parens.
@@
expression COUNT;
typedef u8;
typedef __u8;
@@
(
kzalloc(
- sizeof(u8) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(__u8) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(char) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(unsigned char) * (COUNT)
+ COUNT
, ...)
|
kzalloc(
- sizeof(u8) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(__u8) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(char) * COUNT
+ COUNT
, ...)
|
kzalloc(
- sizeof(unsigned char) * COUNT
+ COUNT
, ...)
)
// 2-factor product with sizeof(type/expression) and identifier or constant.
@@
type TYPE;
expression THING;
identifier COUNT_ID;
constant COUNT_CONST;
@@
(
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (COUNT_ID)
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * COUNT_ID
+ COUNT_ID, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (COUNT_CONST)
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * COUNT_CONST
+ COUNT_CONST, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (COUNT_ID)
+ COUNT_ID, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * COUNT_ID
+ COUNT_ID, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (COUNT_CONST)
+ COUNT_CONST, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * COUNT_CONST
+ COUNT_CONST, sizeof(THING)
, ...)
)
// 2-factor product, only identifiers.
@@
identifier SIZE, COUNT;
@@
- kzalloc
+ kcalloc
(
- SIZE * COUNT
+ COUNT, SIZE
, ...)
// 3-factor product with 1 sizeof(type) or sizeof(expression), with
// redundant parens removed.
@@
expression THING;
identifier STRIDE, COUNT;
type TYPE;
@@
(
kzalloc(
- sizeof(TYPE) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(TYPE) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(TYPE))
, ...)
|
kzalloc(
- sizeof(THING) * (COUNT) * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * (COUNT) * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * COUNT * (STRIDE)
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
|
kzalloc(
- sizeof(THING) * COUNT * STRIDE
+ array3_size(COUNT, STRIDE, sizeof(THING))
, ...)
)
// 3-factor product with 2 sizeof(variable), with redundant parens removed.
@@
expression THING1, THING2;
identifier COUNT;
type TYPE1, TYPE2;
@@
(
kzalloc(
- sizeof(TYPE1) * sizeof(TYPE2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
, ...)
|
kzalloc(
- sizeof(THING1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(THING1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(THING1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * COUNT
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
|
kzalloc(
- sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+ array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
, ...)
)
// 3-factor product, only identifiers, with redundant parens removed.
@@
identifier STRIDE, SIZE, COUNT;
@@
(
kzalloc(
- (COUNT) * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * (STRIDE) * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * STRIDE * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- (COUNT) * (STRIDE) * (SIZE)
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
|
kzalloc(
- COUNT * STRIDE * SIZE
+ array3_size(COUNT, STRIDE, SIZE)
, ...)
)
// Any remaining multi-factor products, first at least 3-factor products,
// when they're not all constants...
@@
expression E1, E2, E3;
constant C1, C2, C3;
@@
(
kzalloc(C1 * C2 * C3, ...)
|
kzalloc(
- (E1) * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- (E1) * (E2) * E3
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- (E1) * (E2) * (E3)
+ array3_size(E1, E2, E3)
, ...)
|
kzalloc(
- E1 * E2 * E3
+ array3_size(E1, E2, E3)
, ...)
)
// And then all remaining 2 factors products when they're not all constants,
// keeping sizeof() as the second factor argument.
@@
expression THING, E1, E2;
type TYPE;
constant C1, C2, C3;
@@
(
kzalloc(sizeof(THING) * C2, ...)
|
kzalloc(sizeof(TYPE) * C2, ...)
|
kzalloc(C1 * C2 * C3, ...)
|
kzalloc(C1 * C2, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * (E2)
+ E2, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(TYPE) * E2
+ E2, sizeof(TYPE)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * (E2)
+ E2, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- sizeof(THING) * E2
+ E2, sizeof(THING)
, ...)
|
- kzalloc
+ kcalloc
(
- (E1) * E2
+ E1, E2
, ...)
|
- kzalloc
+ kcalloc
(
- (E1) * (E2)
+ E1, E2
, ...)
|
- kzalloc
+ kcalloc
(
- E1 * E2
+ E1, E2
, ...)
)
Signed-off-by: Kees Cook <keescook@chromium.org>
2018-06-12 14:03:40 -07:00
|
|
|
|
2010-10-20 11:45:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:15 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-23 17:57:41 -05:00
|
|
|
|
2018-08-27 20:00:19 -05:00
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:15 -06:00
|
|
|
|
2010-06-08 07:48:14 -06:00
|
|
|
|
|
|
|
|
|
2016-09-14 16:01:24 +01:00
|
|
|
|
2014-11-04 10:26:26 +00:00
|
|
|
|
2010-06-08 07:48:14 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2011-01-03 15:51:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2013-07-01 20:26:52 +01:00
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2010-07-22 13:59:23 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2014-05-15 16:55:24 +01:00
|
|
|
|
|
|
|
|
|
2011-01-03 15:51:11 -07:00
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
|
|
|
|
|
2014-05-15 16:55:24 +01:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2018-07-27 15:14:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:21 -06:00
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2015-07-28 14:46:15 +01:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2010-10-20 11:45:13 -06:00
|
|
|
|
|
|
|
|
|
2014-05-15 16:55:24 +01:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-15 16:55:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
2014-05-15 16:55:24 +01:00
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
2011-12-18 11:45:17 +00:00
|
|
|
|
2016-06-15 08:32:18 -05:00
|
|
|
|
2014-05-15 16:55:24 +01:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
2018-08-31 16:13:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
2016-09-14 16:01:24 +01:00
|
|
|
|
2014-11-04 10:26:26 +00:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-30 13:17:29 +02:00
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
2013-08-30 13:17:29 +02:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
2011-12-18 11:45:17 +00:00
|
|
|
|
2013-08-30 13:17:29 +02:00
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
2013-08-30 13:17:29 +02:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-18 11:45:17 +00:00
|
|
|
|
2014-05-15 16:55:24 +01:00
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of/platform: Allow secondary compatible match in of_dev_lookup
We currently try to match of_dev_auxdata based on compatible,
IO address, and device name. But in some cases we have multiple
instances of drivers that can use the same auxdata.
Let's add an additional secondary lookup for generic compatible
match for auxdata if no device specific match is found. This does
not change the existing matching, and still allows adding device
specific auxdata.
This simplifies things as specifying the IO address and device
name is prone errors as it requires maintaining an in kernel
database for each SoC.
To specify a generic match, all that is needed is to add a
OF_DEV_AUXDATA entry with no device instance specified:
OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata),
As the auxdata is already initialized only for the booted SoC,
there's not much of a chance of getting things wrong.
Let's also fix two checkpatch warnings while at it to add a
space before parenthesis in the for loop, and remove a comparison
to NULL by using !auxdata->compatible.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-04-15 08:45:32 -07:00
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
of/platform: Allow secondary compatible match in of_dev_lookup
We currently try to match of_dev_auxdata based on compatible,
IO address, and device name. But in some cases we have multiple
instances of drivers that can use the same auxdata.
Let's add an additional secondary lookup for generic compatible
match for auxdata if no device specific match is found. This does
not change the existing matching, and still allows adding device
specific auxdata.
This simplifies things as specifying the IO address and device
name is prone errors as it requires maintaining an in kernel
database for each SoC.
To specify a generic match, all that is needed is to add a
OF_DEV_AUXDATA entry with no device instance specified:
OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata),
As the auxdata is already initialized only for the booted SoC,
there's not much of a chance of getting things wrong.
Let's also fix two checkpatch warnings while at it to add a
space before parenthesis in the for loop, and remove a comparison
to NULL by using !auxdata->compatible.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-04-15 08:45:32 -07:00
|
|
|
|
2011-11-02 22:07:29 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of/platform: Allow secondary compatible match in of_dev_lookup
We currently try to match of_dev_auxdata based on compatible,
IO address, and device name. But in some cases we have multiple
instances of drivers that can use the same auxdata.
Let's add an additional secondary lookup for generic compatible
match for auxdata if no device specific match is found. This does
not change the existing matching, and still allows adding device
specific auxdata.
This simplifies things as specifying the IO address and device
name is prone errors as it requires maintaining an in kernel
database for each SoC.
To specify a generic match, all that is needed is to add a
OF_DEV_AUXDATA entry with no device instance specified:
OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata),
As the auxdata is already initialized only for the booted SoC,
there's not much of a chance of getting things wrong.
Let's also fix two checkpatch warnings while at it to add a
space before parenthesis in the for loop, and remove a comparison
to NULL by using !auxdata->compatible.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-04-15 08:45:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-02 22:07:29 -07:00
|
|
|
|
of/platform: Allow secondary compatible match in of_dev_lookup
We currently try to match of_dev_auxdata based on compatible,
IO address, and device name. But in some cases we have multiple
instances of drivers that can use the same auxdata.
Let's add an additional secondary lookup for generic compatible
match for auxdata if no device specific match is found. This does
not change the existing matching, and still allows adding device
specific auxdata.
This simplifies things as specifying the IO address and device
name is prone errors as it requires maintaining an in kernel
database for each SoC.
To specify a generic match, all that is needed is to add a
OF_DEV_AUXDATA entry with no device instance specified:
OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata),
As the auxdata is already initialized only for the booted SoC,
there's not much of a chance of getting things wrong.
Let's also fix two checkpatch warnings while at it to add a
space before parenthesis in the for loop, and remove a comparison
to NULL by using !auxdata->compatible.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-04-15 08:45:32 -07:00
|
|
|
|
2012-07-05 15:15:36 +01:00
|
|
|
|
of/platform: Allow secondary compatible match in of_dev_lookup
We currently try to match of_dev_auxdata based on compatible,
IO address, and device name. But in some cases we have multiple
instances of drivers that can use the same auxdata.
Let's add an additional secondary lookup for generic compatible
match for auxdata if no device specific match is found. This does
not change the existing matching, and still allows adding device
specific auxdata.
This simplifies things as specifying the IO address and device
name is prone errors as it requires maintaining an in kernel
database for each SoC.
To specify a generic match, all that is needed is to add a
OF_DEV_AUXDATA entry with no device instance specified:
OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata),
As the auxdata is already initialized only for the booted SoC,
there's not much of a chance of getting things wrong.
Let's also fix two checkpatch warnings while at it to add a
space before parenthesis in the for loop, and remove a comparison
to NULL by using !auxdata->compatible.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-04-15 08:45:32 -07:00
|
|
|
|
2012-07-05 15:15:36 +01:00
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
of/platform: Allow secondary compatible match in of_dev_lookup
We currently try to match of_dev_auxdata based on compatible,
IO address, and device name. But in some cases we have multiple
instances of drivers that can use the same auxdata.
Let's add an additional secondary lookup for generic compatible
match for auxdata if no device specific match is found. This does
not change the existing matching, and still allows adding device
specific auxdata.
This simplifies things as specifying the IO address and device
name is prone errors as it requires maintaining an in kernel
database for each SoC.
To specify a generic match, all that is needed is to add a
OF_DEV_AUXDATA entry with no device instance specified:
OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata),
As the auxdata is already initialized only for the booted SoC,
there's not much of a chance of getting things wrong.
Let's also fix two checkpatch warnings while at it to add a
space before parenthesis in the for loop, and remove a comparison
to NULL by using !auxdata->compatible.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-04-15 08:45:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
of/platform: Allow secondary compatible match in of_dev_lookup
We currently try to match of_dev_auxdata based on compatible,
IO address, and device name. But in some cases we have multiple
instances of drivers that can use the same auxdata.
Let's add an additional secondary lookup for generic compatible
match for auxdata if no device specific match is found. This does
not change the existing matching, and still allows adding device
specific auxdata.
This simplifies things as specifying the IO address and device
name is prone errors as it requires maintaining an in kernel
database for each SoC.
To specify a generic match, all that is needed is to add a
OF_DEV_AUXDATA entry with no device instance specified:
OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata),
As the auxdata is already initialized only for the booted SoC,
there's not much of a chance of getting things wrong.
Let's also fix two checkpatch warnings while at it to add a
space before parenthesis in the for loop, and remove a comparison
to NULL by using !auxdata->compatible.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-04-15 08:45:32 -07:00
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2011-11-02 22:07:29 -07:00
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2011-03-18 10:21:28 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2011-03-18 10:21:29 -06:00
|
|
|
|
2011-11-02 22:07:29 -07:00
|
|
|
|
2011-03-18 10:21:28 -06:00
|
|
|
|
2011-11-02 22:07:29 -07:00
|
|
|
|
2011-03-18 10:21:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2011-03-18 10:21:28 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2010-07-22 13:59:23 -06:00
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-17 11:57:34 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-01 14:52:54 +08:00
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
|
|
|
|
|
2016-06-01 14:52:54 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
2013-08-30 13:17:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2011-03-18 10:21:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-24 16:13:47 +01:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-18 10:21:28 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2011-03-18 10:21:29 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-18 10:21:29 -06:00
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:25 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2016-06-01 14:52:54 +08:00
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2011-03-18 10:21:29 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2011-03-18 10:21:28 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2015-10-22 11:02:49 +02:00
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2015-10-22 11:02:49 +02:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
2011-03-18 10:21:28 -06:00
|
|
|
|
2010-06-08 07:48:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-23 16:25:08 +00:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-01 14:52:54 +08:00
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
2016-06-01 14:52:54 +08:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
2011-06-21 10:59:35 -06:00
|
|
|
|
2015-10-22 11:02:49 +02:00
|
|
|
|
|
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
2015-10-22 11:02:49 +02:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
2014-11-19 22:35:39 +00:00
|
|
|
|
2011-06-21 10:59:34 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-07 17:57:36 -06:00
|
|
|
|
2014-05-15 16:55:24 +01:00
|
|
|
|
2015-08-02 19:44:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-12 13:49:34 +08:00
|
|
|
|
2017-10-10 22:08:53 -07:00
|
|
|
|
2017-10-16 13:17:08 -05:00
|
|
|
|
2018-04-10 11:57:23 -06:00
|
|
|
|
2017-10-10 22:08:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-01 14:52:54 +08:00
|
|
|
|
|
|
|
|
|
2016-07-29 18:11:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-10 22:08:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-29 18:11:32 -07:00
|
|
|
|
2017-10-10 22:08:53 -07:00
|
|
|
|
|
|
|
|
|
2016-07-29 18:11:32 -07:00
|
|
|
|
2017-09-28 11:45:59 +01:00
|
|
|
|
2018-01-18 10:43:39 +00:00
|
|
|
|
2017-09-28 11:45:59 +01:00
|
|
|
|
2018-01-18 10:43:39 +00:00
|
|
|
|
|
|
|
|
|
2017-09-28 11:45:59 +01:00
|
|
|
|
2016-07-29 18:11:32 -07:00
|
|
|
|
|
|
|
|
|
2016-06-01 14:52:54 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-12 13:49:34 +08:00
|
|
|
|
2016-06-01 14:52:54 +08:00
|
|
|
|
2017-05-22 13:09:20 +02:00
|
|
|
|
2014-05-15 16:55:24 +01:00
|
|
|
|
|
|
|
|
|
2014-06-24 16:13:47 +01:00
|
|
|
|
2014-05-15 16:55:24 +01:00
|
|
|
|
|
|
|
|
|
2014-06-24 16:13:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-15 16:55:24 +01:00
|
|
|
|
2018-06-04 15:14:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-15 16:55:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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