#include #include #include #include #include #include #include #include #include "str.h" #include "tstamping.h" int set_sockopt_hwtimestamp(int sock, const char *dev) { int timesource, ret; struct hwtstamp_config hwconfig; struct ifreq ifr; if (!strncmp("any", dev, strlen("any"))) return -1; memset(&hwconfig, 0, sizeof(hwconfig)); hwconfig.tx_type = HWTSTAMP_TX_OFF; hwconfig.rx_filter = HWTSTAMP_FILTER_ALL; memset(&ifr, 0, sizeof(ifr)); strlcpy(ifr.ifr_name, dev, sizeof(ifr.ifr_name)); ifr.ifr_data = &hwconfig; ret = ioctl(sock, SIOCSHWTSTAMP, &ifr); if (ret < 0) return -1; timesource = SOF_TIMESTAMPING_RAW_HARDWARE; return setsockopt(sock, SOL_PACKET, PACKET_TIMESTAMP, ×ource, sizeof(timesource)); } ='hidden' name='id' value='8e6ad35a31e7ebc59543df875fc970200df2cf68'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-11-20 15:37:51 -0200
committerMark Brown <broonie@linaro.org>2013-11-24 13:45:13 +0000
commit8e6ad35a31e7ebc59543df875fc970200df2cf68 (patch)
tree82978d8f3d25c2f8702886130bb5c2c98bf9928f
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
ASoC: wm8510: Use IS_ENABLED() macro
Using the IS_ENABLED() macro can make the code shorter and simpler. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>