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>
static ssize_t reset_reason_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
+ struct tegra_pmc *pmc = dev_get_drvdata(dev);
u32 value;
value = tegra_pmc_readl(pmc, pmc->soc->regs->rst_status);
static ssize_t reset_level_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
+ struct tegra_pmc *pmc = dev_get_drvdata(dev);
u32 value;
value = tegra_pmc_readl(pmc, pmc->soc->regs->rst_status);