|
@@ -350,7 +350,7 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
|
|
|
error_iio_unreg:
|
|
|
iio_device_unregister(indio_dev);
|
|
|
error_remove_trigger:
|
|
|
- hid_sensor_remove_trigger(indio_dev);
|
|
|
+ hid_sensor_remove_trigger(&accel_state->common_attributes);
|
|
|
error_unreg_buffer_funcs:
|
|
|
iio_triggered_buffer_cleanup(indio_dev);
|
|
|
error_free_dev_mem:
|
|
@@ -363,10 +363,11 @@ static int hid_accel_3d_remove(struct platform_device *pdev)
|
|
|
{
|
|
|
struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
|
|
|
struct iio_dev *indio_dev = platform_get_drvdata(pdev);
|
|
|
+ struct accel_3d_state *accel_state = iio_priv(indio_dev);
|
|
|
|
|
|
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_ACCEL_3D);
|
|
|
iio_device_unregister(indio_dev);
|
|
|
- hid_sensor_remove_trigger(indio_dev);
|
|
|
+ hid_sensor_remove_trigger(&accel_state->common_attributes);
|
|
|
iio_triggered_buffer_cleanup(indio_dev);
|
|
|
kfree(indio_dev->channels);
|
|
|
|