mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 16:58:53 +00:00
Reset controller fixes for v4.11
Fix optional reset_control_get_stubs to return NULL and remove warnings from reset_control_* stubs. This fixes commit bb475230b8e5 ("reset: make optional functions really optional"), which was merged in reset-for-4.11, and would cause consumer drivers depending on the new behaviour of optional resets to fail probing if RESET_CONTROLLER Kconfig option is disabled. -----BEGIN PGP SIGNATURE----- iQJLBAABCAA1FiEEBsBxhV1FaKwXuCOBUMKIHHCeYOsFAljRYi0XHHAuemFiZWxA cGVuZ3V0cm9uaXguZGUACgkQUMKIHHCeYOvZrQ//XazJ6tZyJFjpMUKlsfn/akN5 7YTuF2JhUSA1Ivqnit0JNbuyl5EAlZc5nuPp83QJVHugBLFfDwaw9t0bSP+UnkEh AY5erJYCetzSPO8IbaVVWwZPk7xUnw80z32SpAJYMFC3I9vPzHrq1yWJoK21pG9P YIOt8dmp4HSqhZVlhRKbF8w9Abx4kexjLF/nMLQofyffHEpWfSJGQS7qlle3hUBC vRE/89EMIV9gkiTnyuIVQxi2KK97hTmtN+T+aO0nwiNuaP+9bQUEQF7juEsS3szp dB8pkk1za+bsCUIJX6tU6CqGREKu+pJBgKuX120HQqOLlXGpv5n/dMwbOhSy1tdu hjqsbYBHBg88Bnr9k74D3eu1ntPgsyPwTmdauLVVaAgzNOWAOALdSHXOvNAsi03j aIL28QYtjevNA2Eoqjkz0sK5GcdCy59+IjbYpKHmMcqEsr/D3iWikgGyhv8kR7bH k//4zWxcVOkX9PN9Wq6Wmnb/PVd9obAwD9Z3Ec6KUFaxG/DSyTp21QauLfquU7Jo 9KEqT2C1s+G7ZRvf3tDAvS21tP0VW7ynRo3VGdE0fvVCeLHFv4oh6gfmusT9qTlq EfxK73foYpJyIo557TRct6kPwu8/3xMmWG9/dGg81i7ecfBXG3mbw+f3iuDToF0k 5KIWV1EHE1gyHX3qbZg= =dFNW -----END PGP SIGNATURE----- Merge tag 'reset-fixes-for-4.11' of git://git.pengutronix.de/git/pza/linux into fixes Reset controller fixes for v4.11 Fix optional reset_control_get_stubs to return NULL and remove warnings from reset_control_* stubs. This fixes commit bb475230b8e5 ("reset: make optional functions really optional"), which was merged in reset-for-4.11, and would cause consumer drivers depending on the new behaviour of optional resets to fail probing if RESET_CONTROLLER Kconfig option is disabled. * tag 'reset-fixes-for-4.11' of git://git.pengutronix.de/git/pza/linux: reset: fix optional reset_control_get stubs to return NULL Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
6014ce8559
@ -31,31 +31,26 @@ static inline int device_reset_optional(struct device *dev)
|
||||
|
||||
static inline int reset_control_reset(struct reset_control *rstc)
|
||||
{
|
||||
WARN_ON(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int reset_control_assert(struct reset_control *rstc)
|
||||
{
|
||||
WARN_ON(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int reset_control_deassert(struct reset_control *rstc)
|
||||
{
|
||||
WARN_ON(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int reset_control_status(struct reset_control *rstc)
|
||||
{
|
||||
WARN_ON(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void reset_control_put(struct reset_control *rstc)
|
||||
{
|
||||
WARN_ON(1);
|
||||
}
|
||||
|
||||
static inline int __must_check device_reset(struct device *dev)
|
||||
@ -74,14 +69,14 @@ static inline struct reset_control *__of_reset_control_get(
|
||||
const char *id, int index, bool shared,
|
||||
bool optional)
|
||||
{
|
||||
return ERR_PTR(-ENOTSUPP);
|
||||
return optional ? NULL : ERR_PTR(-ENOTSUPP);
|
||||
}
|
||||
|
||||
static inline struct reset_control *__devm_reset_control_get(
|
||||
struct device *dev, const char *id,
|
||||
int index, bool shared, bool optional)
|
||||
{
|
||||
return ERR_PTR(-ENOTSUPP);
|
||||
return optional ? NULL : ERR_PTR(-ENOTSUPP);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_RESET_CONTROLLER */
|
||||
|
Loading…
x
Reference in New Issue
Block a user