Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757185AbbDPJBy (ORCPT ); Thu, 16 Apr 2015 05:01:54 -0400 Received: from mga11.intel.com ([192.55.52.93]:59969 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757010AbbDPJBc (ORCPT ); Thu, 16 Apr 2015 05:01:32 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,586,1422950400"; d="scan'208";a="710065571" From: Robert Dolca To: linux-iio@vger.kernel.org, Jonathan Cameron Cc: linux-kernel@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , Robert Dolca , Denis CIOCCA Subject: [PATCH RFC 3/3] iio: Use with iio_trigger_register_with_dev to register trigger Date: Thu, 16 Apr 2015 12:01:08 +0300 Message-Id: <1429174868-11953-4-git-send-email-robert.dolca@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1429174868-11953-1-git-send-email-robert.dolca@intel.com> References: <1429174868-11953-1-git-send-email-robert.dolca@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1263 Lines: 30 The trigger registered by the driver has the main purpose to be used with this driver so it should be linked to the IIO device. This way the user space applications can find the connection between them. Signed-off-by: Robert Dolca --- drivers/iio/common/st_sensors/st_sensors_trigger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/common/st_sensors/st_sensors_trigger.c b/drivers/iio/common/st_sensors/st_sensors_trigger.c index 8d8ca6f..6681a7d 100644 --- a/drivers/iio/common/st_sensors/st_sensors_trigger.c +++ b/drivers/iio/common/st_sensors/st_sensors_trigger.c @@ -44,7 +44,7 @@ int st_sensors_allocate_trigger(struct iio_dev *indio_dev, sdata->trig->ops = trigger_ops; sdata->trig->dev.parent = sdata->dev; - err = iio_trigger_register(sdata->trig); + err = iio_trigger_register_with_dev(indio_dev, sdata->trig); if (err < 0) { dev_err(&indio_dev->dev, "failed to register iio trigger.\n"); goto iio_trigger_register_error; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/