Revert "drm/mipi-dsi: Fix detach call without attach"
This reverts commit 25eaa9f999
which is
commit 90d50b8d85834e73536fdccd5aa913b30494fef0 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I7d11b085bf6cbe0d7eb1c0d87f5dc5c3cb88e323
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
20b90d46a0
commit
19c319d14d
@ -346,8 +346,7 @@ static int mipi_dsi_remove_device_fn(struct device *dev, void *priv)
|
||||
{
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev);
|
||||
|
||||
if (dsi->attached)
|
||||
mipi_dsi_detach(dsi);
|
||||
mipi_dsi_detach(dsi);
|
||||
mipi_dsi_device_unregister(dsi);
|
||||
|
||||
return 0;
|
||||
@ -370,18 +369,11 @@ EXPORT_SYMBOL(mipi_dsi_host_unregister);
|
||||
int mipi_dsi_attach(struct mipi_dsi_device *dsi)
|
||||
{
|
||||
const struct mipi_dsi_host_ops *ops = dsi->host->ops;
|
||||
int ret;
|
||||
|
||||
if (!ops || !ops->attach)
|
||||
return -ENOSYS;
|
||||
|
||||
ret = ops->attach(dsi->host, dsi);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
dsi->attached = true;
|
||||
|
||||
return 0;
|
||||
return ops->attach(dsi->host, dsi);
|
||||
}
|
||||
EXPORT_SYMBOL(mipi_dsi_attach);
|
||||
|
||||
@ -393,14 +385,9 @@ int mipi_dsi_detach(struct mipi_dsi_device *dsi)
|
||||
{
|
||||
const struct mipi_dsi_host_ops *ops = dsi->host->ops;
|
||||
|
||||
if (WARN_ON(!dsi->attached))
|
||||
return -EINVAL;
|
||||
|
||||
if (!ops || !ops->detach)
|
||||
return -ENOSYS;
|
||||
|
||||
dsi->attached = false;
|
||||
|
||||
return ops->detach(dsi->host, dsi);
|
||||
}
|
||||
EXPORT_SYMBOL(mipi_dsi_detach);
|
||||
|
@ -168,7 +168,6 @@ struct mipi_dsi_device_info {
|
||||
* struct mipi_dsi_device - DSI peripheral device
|
||||
* @host: DSI host for this peripheral
|
||||
* @dev: driver model device node for this peripheral
|
||||
* @attached: the DSI device has been successfully attached
|
||||
* @name: DSI peripheral chip type
|
||||
* @channel: virtual channel assigned to the peripheral
|
||||
* @format: pixel format for video mode
|
||||
@ -185,7 +184,6 @@ struct mipi_dsi_device_info {
|
||||
struct mipi_dsi_device {
|
||||
struct mipi_dsi_host *host;
|
||||
struct device dev;
|
||||
bool attached;
|
||||
|
||||
char name[DSI_DEV_NAME_SIZE];
|
||||
unsigned int channel;
|
||||
|
Loading…
Reference in New Issue
Block a user