projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'rust-fixes-6.3-rc1' of https://github.com/Rust-for-Linux/linux
[linux-2.6-microblaze.git]
/
drivers
/
i2c
/
i2c-core-base.c
diff --git
a/drivers/i2c/i2c-core-base.c
b/drivers/i2c/i2c-core-base.c
index
b47e255
..
cb5fa97
100644
(file)
--- a/
drivers/i2c/i2c-core-base.c
+++ b/
drivers/i2c/i2c-core-base.c
@@
-34,6
+34,7
@@
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/pinctrl/consumer.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/devinfo.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
#include <linux/pm_wakeirq.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
#include <linux/pm_wakeirq.h>
@@
-136,9
+137,9
@@
static int i2c_device_match(struct device *dev, struct device_driver *drv)
return 0;
}
return 0;
}
-static int i2c_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int i2c_device_uevent(
const
struct device *dev, struct kobj_uevent_env *env)
{
{
- struct i2c_client *client = to_i2c_client(dev);
+
const
struct i2c_client *client = to_i2c_client(dev);
int rc;
rc = of_device_uevent_modalias(dev, env);
int rc;
rc = of_device_uevent_modalias(dev, env);
@@
-282,7
+283,9
@@
static void i2c_gpio_init_pinctrl_recovery(struct i2c_adapter *adap)
{
struct i2c_bus_recovery_info *bri = adap->bus_recovery_info;
struct device *dev = &adap->dev;
{
struct i2c_bus_recovery_info *bri = adap->bus_recovery_info;
struct device *dev = &adap->dev;
- struct pinctrl *p = bri->pinctrl;
+ struct pinctrl *p = bri->pinctrl ?: dev_pinctrl(dev->parent);
+
+ bri->pinctrl = p;
/*
* we can't change states without pinctrl, so remove the states if
/*
* we can't change states without pinctrl, so remove the states if