mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:24:45 +01:00
pinctrl: amd: Constify pointers to 'pinctrl_desc'
Internal functions obtaining pointers to 'struct pinctrl_desc' do not modify the contents so they can be made pointers to const. This makes code safer, explicit and later allows constifying 'pinctrl_desc' in pinctrl core code. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/20250611-pinctrl-const-desc-v2-3-b11c1d650384@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
1982621dec
commit
91ed43b045
1 changed files with 4 additions and 4 deletions
|
|
@ -872,7 +872,7 @@ static const struct pinconf_ops amd_pinconf_ops = {
|
|||
|
||||
static void amd_gpio_irq_init(struct amd_gpio *gpio_dev)
|
||||
{
|
||||
struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
|
||||
const struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
|
||||
unsigned long flags;
|
||||
u32 pin_reg, mask;
|
||||
int i;
|
||||
|
|
@ -901,7 +901,7 @@ static void amd_gpio_irq_init(struct amd_gpio *gpio_dev)
|
|||
static void amd_gpio_check_pending(void)
|
||||
{
|
||||
struct amd_gpio *gpio_dev = pinctrl_dev;
|
||||
struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
|
||||
const struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
|
||||
int i;
|
||||
|
||||
if (!pm_debug_messages_on)
|
||||
|
|
@ -957,7 +957,7 @@ static bool amd_gpio_should_save(struct amd_gpio *gpio_dev, unsigned int pin)
|
|||
static int amd_gpio_suspend_hibernate_common(struct device *dev, bool is_suspend)
|
||||
{
|
||||
struct amd_gpio *gpio_dev = dev_get_drvdata(dev);
|
||||
struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
|
||||
const struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
|
||||
unsigned long flags;
|
||||
int i;
|
||||
u32 wake_mask = is_suspend ? WAKE_SOURCE_SUSPEND : WAKE_SOURCE_HIBERNATE;
|
||||
|
|
@ -1001,7 +1001,7 @@ static int amd_gpio_hibernate(struct device *dev)
|
|||
static int amd_gpio_resume(struct device *dev)
|
||||
{
|
||||
struct amd_gpio *gpio_dev = dev_get_drvdata(dev);
|
||||
struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
|
||||
const struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
|
||||
unsigned long flags;
|
||||
int i;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue