Snap for 8166625 from 73d67a4ff6
to android12-5.10-keystone-qcom-release
Change-Id: I4812b8339c5db2702a8ba2fd88b64b77fe0406b5
This commit is contained in:
@@ -132,6 +132,7 @@ void power_supply_changed(struct power_supply *psy)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(power_supply_changed);
|
||||
|
||||
static int psy_register_cooler(struct power_supply *psy);
|
||||
/*
|
||||
* Notify that power supply was registered after parent finished the probing.
|
||||
*
|
||||
@@ -139,6 +140,8 @@ EXPORT_SYMBOL_GPL(power_supply_changed);
|
||||
* calling power_supply_changed() directly from power_supply_register()
|
||||
* would lead to execution of get_property() function provided by the driver
|
||||
* too early - before the probe ends.
|
||||
* Also, registering cooling device from the probe will execute the
|
||||
* get_property() function. So register the cooling device after the probe.
|
||||
*
|
||||
* Avoid that by waiting on parent's mutex.
|
||||
*/
|
||||
@@ -156,6 +159,7 @@ static void power_supply_deferred_register_work(struct work_struct *work)
|
||||
}
|
||||
|
||||
power_supply_changed(psy);
|
||||
psy_register_cooler(psy);
|
||||
|
||||
if (psy->dev.parent)
|
||||
mutex_unlock(&psy->dev.parent->mutex);
|
||||
@@ -1130,9 +1134,15 @@ static int psy_register_cooler(struct power_supply *psy)
|
||||
for (i = 0; i < psy->desc->num_properties; i++) {
|
||||
if (psy->desc->properties[i] ==
|
||||
POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT) {
|
||||
psy->tcd = thermal_cooling_device_register(
|
||||
(char *)psy->desc->name,
|
||||
psy, &psy_tcd_ops);
|
||||
if (psy->dev.parent)
|
||||
psy->tcd = thermal_of_cooling_device_register(
|
||||
dev_of_node(psy->dev.parent),
|
||||
(char *)psy->desc->name,
|
||||
psy, &psy_tcd_ops);
|
||||
else
|
||||
psy->tcd = thermal_cooling_device_register(
|
||||
(char *)psy->desc->name,
|
||||
psy, &psy_tcd_ops);
|
||||
return PTR_ERR_OR_ZERO(psy->tcd);
|
||||
}
|
||||
}
|
||||
@@ -1238,10 +1248,6 @@ __power_supply_register(struct device *parent,
|
||||
if (rc)
|
||||
goto register_thermal_failed;
|
||||
|
||||
rc = psy_register_cooler(psy);
|
||||
if (rc)
|
||||
goto register_cooler_failed;
|
||||
|
||||
rc = power_supply_create_triggers(psy);
|
||||
if (rc)
|
||||
goto create_triggers_failed;
|
||||
@@ -1271,8 +1277,6 @@ __power_supply_register(struct device *parent,
|
||||
add_hwmon_sysfs_failed:
|
||||
power_supply_remove_triggers(psy);
|
||||
create_triggers_failed:
|
||||
psy_unregister_cooler(psy);
|
||||
register_cooler_failed:
|
||||
psy_unregister_thermal(psy);
|
||||
register_thermal_failed:
|
||||
device_del(dev);
|
||||
|
@@ -1258,6 +1258,19 @@ static void __dwc3_prepare_one_trb(struct dwc3_ep *dep, struct dwc3_trb *trb,
|
||||
if (usb_endpoint_xfer_bulk(dep->endpoint.desc) && dep->stream_capable)
|
||||
trb->ctrl |= DWC3_TRB_CTRL_SID_SOFN(stream_id);
|
||||
|
||||
/*
|
||||
* As per data book 4.2.3.2TRB Control Bit Rules section
|
||||
*
|
||||
* The controller autonomously checks the HWO field of a TRB to determine if the
|
||||
* entire TRB is valid. Therefore, software must ensure that the rest of the TRB
|
||||
* is valid before setting the HWO field to '1'. In most systems, this means that
|
||||
* software must update the fourth DWORD of a TRB last.
|
||||
*
|
||||
* However there is a possibility of CPU re-ordering here which can cause
|
||||
* controller to observe the HWO bit set prematurely.
|
||||
* Add a write memory barrier to prevent CPU re-ordering.
|
||||
*/
|
||||
wmb();
|
||||
trb->ctrl |= DWC3_TRB_CTRL_HWO;
|
||||
|
||||
dwc3_ep_inc_enq(dep);
|
||||
|
@@ -504,8 +504,7 @@ static struct dentry *__create_dir(const char *name, struct dentry *parent,
|
||||
if (unlikely(!inode))
|
||||
return failed_creating(dentry);
|
||||
|
||||
/* Do not set bits for OTH */
|
||||
inode->i_mode = S_IFDIR | S_IRWXU | S_IRUSR| S_IRGRP | S_IXUSR | S_IXGRP;
|
||||
inode->i_mode = S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO;
|
||||
inode->i_op = ops;
|
||||
inode->i_fop = &simple_dir_operations;
|
||||
inode->i_uid = d_inode(dentry->d_parent)->i_uid;
|
||||
|
Reference in New Issue
Block a user