forked from Minki/linux
staging: gasket: core: remove device enable and disable callbacks
Device enable/disable operations are moving from being initiated through the gasket framework to being initiated by the gasket device driver. The driver can perform any processing needed for these operations before or after the calls into the framework. Neither of these callbacks are implemented for the only gasket driver upstream today, apex. Signed-off-by: Todd Poynor <toddpoynor@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c75e2bb32f
commit
1b25e6e81a
@ -648,8 +648,6 @@ static void gasket_disable_dev(struct gasket_dev *gasket_dev)
|
||||
gasket_page_table_cleanup(gasket_dev->page_table[i]);
|
||||
}
|
||||
}
|
||||
|
||||
check_and_invoke_callback(gasket_dev, driver_desc->disable_dev_cb);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1408,13 +1406,6 @@ static int gasket_enable_dev(struct gasket_internal_desc *internal_desc,
|
||||
}
|
||||
gasket_dev->hardware_revision = ret;
|
||||
|
||||
ret = check_and_invoke_callback(gasket_dev, driver_desc->enable_dev_cb);
|
||||
if (ret) {
|
||||
dev_err(gasket_dev->dev, "Error in enable device cb: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* device_status_cb returns a device status, not an error code. */
|
||||
gasket_dev->status = gasket_get_hw_status(gasket_dev);
|
||||
if (gasket_dev->status == GASKET_STATUS_DEAD)
|
||||
|
@ -473,34 +473,11 @@ struct gasket_driver_desc {
|
||||
*/
|
||||
int (*device_close_cb)(struct gasket_dev *dev);
|
||||
|
||||
/*
|
||||
* enable_dev_cb: Callback immediately before enabling the device.
|
||||
* @dev: Pointer to the gasket_dev struct for this driver instance.
|
||||
*
|
||||
* This callback is invoked after the device has been added and all BAR
|
||||
* spaces mapped, immediately before registering and enabling the
|
||||
* [character] device via cdev_add. If this call fails (returns
|
||||
* nonzero), disable_dev_cb will be called.
|
||||
*
|
||||
* Note that cdev are initialized but not active
|
||||
* (cdev_add has not yet been called) when this callback is invoked.
|
||||
*/
|
||||
int (*enable_dev_cb)(struct gasket_dev *dev);
|
||||
|
||||
/*
|
||||
* disable_dev_cb: Callback immediately after disabling the device.
|
||||
* @dev: Pointer to the gasket_dev struct for this driver instance.
|
||||
*
|
||||
* Called during device shutdown, immediately after disabling device
|
||||
* operations via cdev_del.
|
||||
*/
|
||||
int (*disable_dev_cb)(struct gasket_dev *dev);
|
||||
|
||||
/*
|
||||
* sysfs_setup_cb: Callback to set up driver-specific sysfs nodes.
|
||||
* @dev: Pointer to the gasket_dev struct for this device.
|
||||
*
|
||||
* Called just before enable_dev_cb.
|
||||
* Called during the add gasket device call.
|
||||
*
|
||||
*/
|
||||
int (*sysfs_setup_cb)(struct gasket_dev *dev);
|
||||
@ -509,7 +486,7 @@ struct gasket_driver_desc {
|
||||
* sysfs_cleanup_cb: Callback to clean up driver-specific sysfs nodes.
|
||||
* @dev: Pointer to the gasket_dev struct for this device.
|
||||
*
|
||||
* Called just before disable_dev_cb.
|
||||
* Called during device disable processing.
|
||||
*
|
||||
*/
|
||||
int (*sysfs_cleanup_cb)(struct gasket_dev *dev);
|
||||
|
Loading…
Reference in New Issue
Block a user