From patchwork Tue Sep 10 12:49:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 19893 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6111526116 for ; Tue, 10 Sep 2013 12:50:28 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wd6sf27361921obb.11 for ; Tue, 10 Sep 2013 05:50:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=ET8wktLR/kV4Vr7wjEwigvo+f2C4h3ixI3xPK1wh4Wo=; b=NyX6/0nH95W2FggKitkB0qttMIg/rUl/kMYKuKZfPjd6Hedvf8bulEJjdCZymR4IyI pndG2mI71X7cXk9LgaV1gb/E8uci5meAKsJTE3Ggwe7ATx9llkOxhz1NDfVTPizHa0nm aSEYq7KOqrOaEsT2pD+xxmqK6ukkmdVpu8AtIsVHPVCj3JiUw8EMfWs8+H63cVUVr4BB N7EKVh9vVy/+XLQ0Z4ajygAG+t/j3CM9YWX++j644lmo3RKS8Nl6u5vDOaK2IvmXmkm6 wmerFl8SmMf6fKrtmV4YXPXCEiKY+5zSlAUGAsf2JZfmrDP3b8biVwCW0JHkfUQJ7DPN 0Dhg== X-Received: by 10.182.81.7 with SMTP id v7mr4432398obx.28.1378817427940; Tue, 10 Sep 2013 05:50:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.117.69 with SMTP id kc5ls2298173qeb.42.gmail; Tue, 10 Sep 2013 05:50:27 -0700 (PDT) X-Received: by 10.58.201.69 with SMTP id jy5mr436482vec.29.1378817427682; Tue, 10 Sep 2013 05:50:27 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id xt2si4393342vcb.108.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 05:50:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so4986869vcb.14 for ; Tue, 10 Sep 2013 05:50:27 -0700 (PDT) X-Gm-Message-State: ALoCoQn04H/5P65cehBCaq8EO4IA8yv9TyQrtyq1nvgddQeQwVYCL4dJou38Igpzj81Be5mrCuXe X-Received: by 10.58.246.8 with SMTP id xs8mr23173031vec.9.1378817427617; Tue, 10 Sep 2013 05:50:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp19423vcz; Tue, 10 Sep 2013 05:50:27 -0700 (PDT) X-Received: by 10.15.56.199 with SMTP id y47mr2584567eew.73.1378817423764; Tue, 10 Sep 2013 05:50:23 -0700 (PDT) Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com [74.125.83.51]) by mx.google.com with ESMTPS id 41si14867623eee.47.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 05:50:23 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.51 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.83.51; Received: by mail-ee0-f51.google.com with SMTP id c1so3835172eek.38 for ; Tue, 10 Sep 2013 05:50:23 -0700 (PDT) X-Received: by 10.14.172.133 with SMTP id t5mr38469690eel.35.1378817423231; Tue, 10 Sep 2013 05:50:23 -0700 (PDT) Received: from localhost.localdomain (cpc15-aztw25-2-0-cust493.aztw.cable.virginmedia.com. [92.233.57.238]) by mx.google.com with ESMTPSA id z12sm31123277eev.6.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 05:50:22 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, jic23@cam.ac.uk Cc: arnd@arndb.de, linus.walleij@linaro.org, denis.ciocca@st.com, linux-iio@vger.kernel.org, Lee Jones Subject: [PATCH 37/38] iio: magn-core: st: Give some indication if device probing was successful Date: Tue, 10 Sep 2013 13:49:38 +0100 Message-Id: <1378817379-8238-38-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1378817379-8238-1-git-send-email-lee.jones@linaro.org> References: <1378817379-8238-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , At the moment the driver is silent in some error cases and if successful. Prior to this patch there was no clear way to know if the driver succeeded or not without looking deep into sysfs. Signed-off-by: Lee Jones --- drivers/iio/magnetometer/st_magn_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c index c252659..12e7e79 100644 --- a/drivers/iio/magnetometer/st_magn_core.c +++ b/drivers/iio/magnetometer/st_magn_core.c @@ -386,6 +386,9 @@ int st_magn_common_probe(struct iio_dev *indio_dev, if (err && irq > 0) goto st_magn_device_register_error; + if (!err) + dev_info(&indio_dev->dev, "Successfully registered\n"); + return err; st_magn_device_register_error: