Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for newer kernels. (Tested on 6.11.x) #1

Open
wants to merge 2 commits into
base: touchbar-driver-hid-driver
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions apple-ib-als.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,23 +645,14 @@ static int appleals_platform_probe(struct platform_device *pdev)
return rc;
}

static int appleals_platform_remove(struct platform_device *pdev)
static void appleals_platform_remove(struct platform_device *pdev)
{
struct appleib_device_data *ddata = pdev->dev.platform_data;
struct appleib_device *ib_dev = ddata->ib_dev;
struct appleals_device *als_dev = platform_get_drvdata(pdev);
int rc;

rc = appleib_unregister_hid_driver(ib_dev, &appleals_hid_driver);
if (rc)
goto error;

appleib_unregister_hid_driver(ib_dev, &appleals_hid_driver);
kfree(als_dev);

return 0;

error:
return rc;
return;
}

static const struct platform_device_id appleals_platform_ids[] = {
Expand Down
14 changes: 3 additions & 11 deletions apple-ib-tb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1259,23 +1259,15 @@ static int appletb_platform_probe(struct platform_device *pdev)
return rc;
}

static int appletb_platform_remove(struct platform_device *pdev)
static void appletb_platform_remove(struct platform_device *pdev)
{
struct appleib_device_data *ddata = pdev->dev.platform_data;
struct appleib_device *ib_dev = ddata->ib_dev;
struct appletb_device *tb_dev = platform_get_drvdata(pdev);
int rc;

rc = appleib_unregister_hid_driver(ib_dev, &appletb_hid_driver);
if (rc)
goto error;

appleib_unregister_hid_driver(ib_dev, &appletb_hid_driver);
appletb_free_device(tb_dev);

return 0;

error:
return rc;
return;
}

static const struct platform_device_id appletb_platform_ids[] = {
Expand Down
1 change: 0 additions & 1 deletion apple-ibridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,6 @@ MODULE_DEVICE_TABLE(acpi, appleib_acpi_match);
static struct acpi_driver appleib_driver = {
.name = "apple-ibridge",
.class = "topcase", /* ? */
.owner = THIS_MODULE,
.ids = appleib_acpi_match,
.ops = {
.add = appleib_probe,
Expand Down