Skip to content

Commit

Permalink
Fix compilation on 6.11 kernel (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Etaash-mathamsetty authored Oct 10, 2024
1 parent d65592b commit 7c4e83d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions zenergy.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,20 @@ static int zenergy_probe(struct platform_device *pdev)
return PTR_ERR_OR_ZERO(data->wrap_accumulate);
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
static int zenergy_remove(struct platform_device *pdev)
#else
static void zenergy_remove(struct platform_device *pdev)
#endif
{
struct zenergy_data *data = dev_get_drvdata(&pdev->dev);

if (data && data->wrap_accumulate)
kthread_stop(data->wrap_accumulate);

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
return 0;
#endif
}

static const struct platform_device_id zenergy_ids[] = {
Expand Down

0 comments on commit 7c4e83d

Please sign in to comment.