From 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 13 May 2024 10:30:14 +0000 Subject: [PATCH] modify sin led gpio --- kernel/drivers/mfd/ssbi.c | 16 +++------------- 1 files changed, 3 insertions(+), 13 deletions(-) diff --git a/kernel/drivers/mfd/ssbi.c b/kernel/drivers/mfd/ssbi.c index 36b96fe..94f60df 100644 --- a/kernel/drivers/mfd/ssbi.c +++ b/kernel/drivers/mfd/ssbi.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. * Copyright (c) 2010, Google Inc. * @@ -5,15 +6,6 @@ * * Author: Dima Zavin <dima@android.com> * - Largely rewritten from original to not be an i2c driver. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ #define pr_fmt(fmt) "%s: " fmt, __func__ @@ -79,8 +71,6 @@ int (*read)(struct ssbi *, u16 addr, u8 *buf, int len); int (*write)(struct ssbi *, u16 addr, const u8 *buf, int len); }; - -#define to_ssbi(dev) platform_get_drvdata(to_platform_device(dev)) static inline u32 ssbi_readl(struct ssbi *ssbi, u32 reg) { @@ -243,7 +233,7 @@ int ssbi_read(struct device *dev, u16 addr, u8 *buf, int len) { - struct ssbi *ssbi = to_ssbi(dev); + struct ssbi *ssbi = dev_get_drvdata(dev); unsigned long flags; int ret; @@ -257,7 +247,7 @@ int ssbi_write(struct device *dev, u16 addr, const u8 *buf, int len) { - struct ssbi *ssbi = to_ssbi(dev); + struct ssbi *ssbi = dev_get_drvdata(dev); unsigned long flags; int ret; -- Gitblit v1.6.2