mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
Revert "usb: typec: bus: verify partner exists in typec_altmode_attention"
This reverts commit0d3b5fe479which is commitf236433064upstream. It breaks the Android ABI and is not needed for Android systems at this point in time. If needed in the future, it can come back in an abi-safe way. Bug: 161946584 Change-Id: Ib271c569a1f86228f86e4c9b164d96f1bf0f0019 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -154,20 +154,12 @@ EXPORT_SYMBOL_GPL(typec_altmode_exit);
|
|||||||
*
|
*
|
||||||
* Notifies the partner of @adev about Attention command.
|
* Notifies the partner of @adev about Attention command.
|
||||||
*/
|
*/
|
||||||
int typec_altmode_attention(struct typec_altmode *adev, u32 vdo)
|
void typec_altmode_attention(struct typec_altmode *adev, u32 vdo)
|
||||||
{
|
{
|
||||||
struct altmode *partner = to_altmode(adev)->partner;
|
struct typec_altmode *pdev = &to_altmode(adev)->partner->adev;
|
||||||
struct typec_altmode *pdev;
|
|
||||||
|
|
||||||
if (!partner)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
pdev = &partner->adev;
|
|
||||||
|
|
||||||
if (pdev->ops && pdev->ops->attention)
|
if (pdev->ops && pdev->ops->attention)
|
||||||
pdev->ops->attention(pdev, vdo);
|
pdev->ops->attention(pdev, vdo);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(typec_altmode_attention);
|
EXPORT_SYMBOL_GPL(typec_altmode_attention);
|
||||||
|
|
||||||
|
|||||||
@@ -1885,8 +1885,7 @@ static void tcpm_handle_vdm_request(struct tcpm_port *port,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ADEV_ATTENTION:
|
case ADEV_ATTENTION:
|
||||||
if (typec_altmode_attention(adev, p[1]))
|
typec_altmode_attention(adev, p[1]);
|
||||||
tcpm_log(port, "typec_altmode_attention no port partner altmode");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ struct typec_altmode_ops {
|
|||||||
|
|
||||||
int typec_altmode_enter(struct typec_altmode *altmode, u32 *vdo);
|
int typec_altmode_enter(struct typec_altmode *altmode, u32 *vdo);
|
||||||
int typec_altmode_exit(struct typec_altmode *altmode);
|
int typec_altmode_exit(struct typec_altmode *altmode);
|
||||||
int typec_altmode_attention(struct typec_altmode *altmode, u32 vdo);
|
void typec_altmode_attention(struct typec_altmode *altmode, u32 vdo);
|
||||||
int typec_altmode_vdm(struct typec_altmode *altmode,
|
int typec_altmode_vdm(struct typec_altmode *altmode,
|
||||||
const u32 header, const u32 *vdo, int count);
|
const u32 header, const u32 *vdo, int count);
|
||||||
int typec_altmode_notify(struct typec_altmode *altmode, unsigned long conf,
|
int typec_altmode_notify(struct typec_altmode *altmode, unsigned long conf,
|
||||||
|
|||||||
Reference in New Issue
Block a user