You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'staging-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg Kroah-Hartman: "Here are some staging tree driver fixes for 3.10-rc2 The drivers/iio/ changes are here as they are still tied into drivers/staging/iio/. Nothing major, just a number of small bugfixes, and a larger documentation update for the ramster code." * tag 'staging-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (28 commits) staging: dwc2: remove compile warning for USB_DWC2_TRACK_MISSED_SOFS iio: exynos_adc: fix wrong structure extration in suspend and resume iio:common:st: added disable function after read info raw data iio: dac: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m staging:iio:light:tsl2x7x: fix the error handling in tsl2x7x_probe() staging/iio/mxs-lradc: fix preenable for multiple buffers staging: imx-drm: imx-tve: Check the return value of 'regulator_enable()' staging: video: imx: Select VIDEOMODE_HELPERS for parallel display staging: ramster: add how-to document staging: dwc2: Fix dma-enabled platform devices using a default dma_mask staging: vt6656: [bug] Fix missing spin lock in iwctl_siwpower. staging: Swap zram and zsmalloc in Kconfig staging: android: logger: use kuid_t instead of uid_t staging: zcache: Fix incorrect module_param_array types staging/solo6x10: depend on CONFIG_FONTS staging/drm: imx: add missing dependencies staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warning staging: sep: fix driver build and kconfig staging: nvec: cleanup childs on remove staging: nvec: implement unregistering of notifiers ...
This commit is contained in:
@@ -123,6 +123,20 @@ int nvec_register_notifier(struct nvec_chip *nvec, struct notifier_block *nb,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nvec_register_notifier);
|
||||
|
||||
/**
|
||||
* nvec_unregister_notifier - Unregister a notifier with nvec
|
||||
* @nvec: A &struct nvec_chip
|
||||
* @nb: The notifier block to unregister
|
||||
*
|
||||
* Unregisters a notifier with @nvec. The notifier will be removed from the
|
||||
* atomic notifier chain.
|
||||
*/
|
||||
int nvec_unregister_notifier(struct nvec_chip *nvec, struct notifier_block *nb)
|
||||
{
|
||||
return atomic_notifier_chain_unregister(&nvec->notifier_list, nb);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nvec_unregister_notifier);
|
||||
|
||||
/**
|
||||
* nvec_status_notifier - The final notifier
|
||||
*
|
||||
@@ -185,7 +199,7 @@ static struct nvec_msg *nvec_msg_alloc(struct nvec_chip *nvec,
|
||||
*
|
||||
* Free the given message
|
||||
*/
|
||||
inline void nvec_msg_free(struct nvec_chip *nvec, struct nvec_msg *msg)
|
||||
void nvec_msg_free(struct nvec_chip *nvec, struct nvec_msg *msg)
|
||||
{
|
||||
if (msg != &nvec->tx_scratch)
|
||||
dev_vdbg(nvec->dev, "INFO: Free %ti\n", msg - nvec->msg_pool);
|
||||
@@ -810,7 +824,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
i2c_clk = clk_get(&pdev->dev, "div-clk");
|
||||
i2c_clk = devm_clk_get(&pdev->dev, "div-clk");
|
||||
if (IS_ERR(i2c_clk)) {
|
||||
dev_err(nvec->dev, "failed to get controller clock\n");
|
||||
return -ENODEV;
|
||||
@@ -897,8 +911,11 @@ static int tegra_nvec_remove(struct platform_device *pdev)
|
||||
|
||||
nvec_toggle_global_events(nvec, false);
|
||||
mfd_remove_devices(nvec->dev);
|
||||
nvec_unregister_notifier(nvec, &nvec->nvec_status_notifier);
|
||||
cancel_work_sync(&nvec->rx_work);
|
||||
cancel_work_sync(&nvec->tx_work);
|
||||
/* FIXME: needs check wether nvec is responsible for power off */
|
||||
pm_power_off = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -197,9 +197,8 @@ extern int nvec_register_notifier(struct nvec_chip *nvec,
|
||||
struct notifier_block *nb,
|
||||
unsigned int events);
|
||||
|
||||
extern int nvec_unregister_notifier(struct device *dev,
|
||||
struct notifier_block *nb,
|
||||
unsigned int events);
|
||||
extern int nvec_unregister_notifier(struct nvec_chip *dev,
|
||||
struct notifier_block *nb);
|
||||
|
||||
extern void nvec_msg_free(struct nvec_chip *nvec, struct nvec_msg *msg);
|
||||
|
||||
|
||||
@@ -169,8 +169,15 @@ fail:
|
||||
|
||||
static int nvec_kbd_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
|
||||
char disable_kbd[] = { NVEC_KBD, DISABLE_KBD },
|
||||
uncnfg_wake_key_reporting[] = { NVEC_KBD, CNFG_WAKE_KEY_REPORTING,
|
||||
false };
|
||||
nvec_write_async(nvec, uncnfg_wake_key_reporting, 3);
|
||||
nvec_write_async(nvec, disable_kbd, 2);
|
||||
nvec_unregister_notifier(nvec, &keys_dev.notifier);
|
||||
|
||||
input_unregister_device(keys_dev.input);
|
||||
input_free_device(keys_dev.input);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -188,4 +195,5 @@ module_platform_driver(nvec_kbd_driver);
|
||||
|
||||
MODULE_AUTHOR("Marc Dietrich <marvin24@gmx.de>");
|
||||
MODULE_DESCRIPTION("NVEC keyboard driver");
|
||||
MODULE_ALIAS("platform:nvec-kbd");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
@@ -414,6 +414,7 @@ static int nvec_power_remove(struct platform_device *pdev)
|
||||
struct nvec_power *power = platform_get_drvdata(pdev);
|
||||
|
||||
cancel_delayed_work_sync(&power->poller);
|
||||
nvec_unregister_notifier(power->nvec, &power->notifier);
|
||||
switch (pdev->id) {
|
||||
case AC:
|
||||
power_supply_unregister(&nvec_psy);
|
||||
|
||||
@@ -106,7 +106,7 @@ static int nvec_mouse_probe(struct platform_device *pdev)
|
||||
struct serio *ser_dev;
|
||||
char mouse_reset[] = { NVEC_PS2, SEND_COMMAND, PSMOUSE_RST, 3 };
|
||||
|
||||
ser_dev = devm_kzalloc(&pdev->dev, sizeof(struct serio), GFP_KERNEL);
|
||||
ser_dev = kzalloc(sizeof(struct serio), GFP_KERNEL);
|
||||
if (ser_dev == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -133,6 +133,11 @@ static int nvec_mouse_probe(struct platform_device *pdev)
|
||||
|
||||
static int nvec_mouse_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
|
||||
|
||||
ps2_sendcommand(ps2_dev.ser_dev, DISABLE_MOUSE);
|
||||
ps2_stopstreaming(ps2_dev.ser_dev);
|
||||
nvec_unregister_notifier(nvec, &ps2_dev.notifier);
|
||||
serio_unregister_port(ps2_dev.ser_dev);
|
||||
|
||||
return 0;
|
||||
@@ -179,4 +184,5 @@ module_platform_driver(nvec_mouse_driver);
|
||||
|
||||
MODULE_DESCRIPTION("NVEC mouse driver");
|
||||
MODULE_AUTHOR("Marc Dietrich <marvin24@gmx.de>");
|
||||
MODULE_ALIAS("platform:nvec-mouse");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
Reference in New Issue
Block a user