From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753046AbbBYOLD (ORCPT ); Wed, 25 Feb 2015 09:11:03 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:46132 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751852AbbBYOLA (ORCPT ); Wed, 25 Feb 2015 09:11:00 -0500 Message-ID: <1424873453.19477.0.camel@phoenix> Subject: [PATCH] phy: xgene: Remove duplicate code to set ctx->dev From: Axel Lin To: Kishon Vijay Abraham I Cc: Loc Ho , linux-kernel@vger.kernel.org Date: Wed, 25 Feb 2015 22:10:53 +0800 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Set it once is enough and it's done after devm_kzalloc(). Signed-off-by: Axel Lin --- drivers/phy/phy-xgene.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/phy/phy-xgene.c b/drivers/phy/phy-xgene.c index 29214a3..2263cd0 100644 --- a/drivers/phy/phy-xgene.c +++ b/drivers/phy/phy-xgene.c @@ -1704,7 +1704,6 @@ static int xgene_phy_probe(struct platform_device *pdev) for (i = 0; i < MAX_LANE; i++) ctx->sata_param.speed[i] = 2; /* Default to Gen3 */ - ctx->dev = &pdev->dev; platform_set_drvdata(pdev, ctx); ctx->phy = devm_phy_create(ctx->dev, NULL, &xgene_phy_ops); -- 1.9.1