Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

soc/tegra: pmc: Use driver-private data

Instead of relying on a global variable for the PMC context, use the
driver-private data for sysfs attributes.

Signed-off-by: Thierry Reding <treding@nvidia.com>

+2
+2
drivers/soc/tegra/pmc.c
··· 2243 2243 static ssize_t reset_reason_show(struct device *dev, 2244 2244 struct device_attribute *attr, char *buf) 2245 2245 { 2246 + struct tegra_pmc *pmc = dev_get_drvdata(dev); 2246 2247 u32 value; 2247 2248 2248 2249 value = tegra_pmc_readl(pmc, pmc->soc->regs->rst_status); ··· 2261 2260 static ssize_t reset_level_show(struct device *dev, 2262 2261 struct device_attribute *attr, char *buf) 2263 2262 { 2263 + struct tegra_pmc *pmc = dev_get_drvdata(dev); 2264 2264 u32 value; 2265 2265 2266 2266 value = tegra_pmc_readl(pmc, pmc->soc->regs->rst_status);