Skip to content

Commit cb161c3

Browse files
andy-shevbroonie
authored andcommitted
ASoC: tas2781: Switch to use %ptTsr
Use %ptTsr instead of open-coded variant to print contents of time64_t type in human readable form. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250206192537.1133763-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 6b8f162 commit cb161c3

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

include/sound/tas2781.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ struct tasdevice_priv {
161161
struct mutex codec_lock;
162162
struct regmap *regmap;
163163
struct device *dev;
164-
struct tm tm;
165164

166165
enum device_catlog_id catlog_id;
167166
unsigned char cal_binaryname[TASDEVICE_MAX_CHANNELS][64];

sound/pci/hda/tas2781-spi.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ struct tasdevice_priv {
8888
struct mutex codec_lock;
8989
struct regmap *regmap;
9090
struct device *dev;
91-
struct tm tm;
9291

9392
unsigned char crc8_lkp_tbl[CRC8_TABLE_SIZE];
9493
unsigned char coef_binaryname[64];

sound/pci/hda/tas2781_hda_i2c.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,6 @@ static int tas2781_save_calibration(struct tasdevice_priv *tas_priv)
594594
efi_guid_t efi_guid = EFI_GUID(0x02f9af02, 0x7734, 0x4233, 0xb4, 0x3d,
595595
0x93, 0xfe, 0x5a, 0xa3, 0x5d, 0xb3);
596596
static efi_char16_t efi_name[] = L"CALI_DATA";
597-
struct tm *tm = &tas_priv->tm;
598597
unsigned int attr, crc;
599598
unsigned int *tmp_val;
600599
efi_status_t status;
@@ -629,10 +628,9 @@ static int tas2781_save_calibration(struct tasdevice_priv *tas_priv)
629628
crc, tmp_val[21]);
630629

631630
if (crc == tmp_val[21]) {
632-
time64_to_tm(tmp_val[20], 0, tm);
633-
dev_dbg(tas_priv->dev, "%4ld-%2d-%2d, %2d:%2d:%2d\n",
634-
tm->tm_year, tm->tm_mon, tm->tm_mday,
635-
tm->tm_hour, tm->tm_min, tm->tm_sec);
631+
time64_t seconds = tmp_val[20];
632+
633+
dev_dbg(tas_priv->dev, "%ptTsr\n", &seconds);
636634
tasdevice_apply_calibration(tas_priv);
637635
} else
638636
tas_priv->cali_data.total_sz = 0;

sound/pci/hda/tas2781_hda_spi.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,6 @@ static int tas2781_save_calibration(struct tasdevice_priv *tas_priv)
802802
static efi_char16_t efi_name[] = TASDEVICE_CALIBRATION_DATA_NAME;
803803
unsigned char data[TASDEVICE_CALIBRATION_DATA_SIZE], *buf;
804804
unsigned int attr, crc, offset, *tmp_val;
805-
struct tm *tm = &tas_priv->tm;
806805
unsigned long total_sz = 0;
807806
efi_status_t status;
808807

@@ -849,7 +848,6 @@ static int tas2781_save_calibration(struct tasdevice_priv *tas_priv)
849848
if (crc != tmp_val[3 + tmp_val[1] * 6])
850849
return 0;
851850

852-
time64_to_tm(tmp_val[2], 0, tm);
853851
for (int j = 0; j < tmp_val[1]; j++) {
854852
offset = j * 6 + 3;
855853
if (tmp_val[offset] == tas_priv->index) {
@@ -882,7 +880,6 @@ static int tas2781_save_calibration(struct tasdevice_priv *tas_priv)
882880
*/
883881
crc = crc32(~0, data, 84) ^ ~0;
884882
if (crc == tmp_val[21]) {
885-
time64_to_tm(tmp_val[20], 0, tm);
886883
for (int i = 0; i < CALIB_MAX; i++)
887884
tas_priv->cali_data[i] =
888885
tmp_val[tas_priv->index * 5 + i];

0 commit comments

Comments
 (0)