Skip to content

Commit

Permalink
auxdisplay: ht16k33: Move ht16k33_linedisp_ops down
Browse files Browse the repository at this point in the history
We will need the update functions to be defined before
ht16k33_linedisp_ops. Move the latter down in the code.
No functional change intended.

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Robin van der Gracht <robin@protonic.nl>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  • Loading branch information
Andy Shevchenko committed Feb 26, 2024
1 parent ef2086a commit 5a805a7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions drivers/auxdisplay/ht16k33.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,18 +439,6 @@ static void ht16k33_keypad_stop(struct input_dev *dev)
disable_irq(keypad->client->irq);
}

static void ht16k33_linedisp_update(struct linedisp *linedisp)
{
struct ht16k33_priv *priv = container_of(linedisp, struct ht16k33_priv,
seg.linedisp);

schedule_delayed_work(&priv->work, 0);
}

static const struct linedisp_ops ht16k33_linedisp_ops = {
.update = ht16k33_linedisp_update,
};

static void ht16k33_seg7_update(struct work_struct *work)
{
struct ht16k33_priv *priv = container_of(work, struct ht16k33_priv,
Expand Down Expand Up @@ -488,6 +476,18 @@ static void ht16k33_seg14_update(struct work_struct *work)
i2c_smbus_write_i2c_block_data(priv->client, 0, ARRAY_SIZE(buf), buf);
}

static void ht16k33_linedisp_update(struct linedisp *linedisp)
{
struct ht16k33_priv *priv = container_of(linedisp, struct ht16k33_priv,
seg.linedisp);

schedule_delayed_work(&priv->work, 0);
}

static const struct linedisp_ops ht16k33_linedisp_ops = {
.update = ht16k33_linedisp_update,
};

static int ht16k33_led_probe(struct device *dev, struct led_classdev *led,
unsigned int brightness)
{
Expand Down

0 comments on commit 5a805a7

Please sign in to comment.